Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.threed.jpct
Class LegacyRenderer

    java.lang.Object
      com.threed.jpct.LegacyRenderer

All Implemented Interfaces:
  IRenderer, java.io.Serializable

public final class LegacyRenderer
extends java.lang.Object
implements IRenderer, java.io.Serializable

This renderer was the default renderer in older versions. It's still here to support legacy applications that rely on it, but it's not advised to use it for new applications.
It behaves exactly the same as the software renderer of all versions of jPCT prior to 0.83 will do.
This renderer will go away in the future...don't use it!

See Also:
  Serialized Form

Field Summary

Fields inherited from interface com.threed.jpct.IRenderer
`MODE_LEGACY, MODE_OPENGL, RENDERER_OPENGL, RENDERER_SOFTWARE`

Method Summary
`void` | `dispose()` Disposes the renderer and all its resources if it's not used any longer.
`void` | `drawPolygon(VisList visList, int ind, FrameBuffer buffer, World world)` Draws a polygon.
`void` | `drawStrip(VisList visList, int ind, int length, FrameBuffer buffer, World world)` Draws a triangle strip.
`void` | `drawVertexArray(VisList visList, int start, int end, FrameBuffer buffer, World world)` Draws a vertex array.
`void` | `drawWireframe(VisList visList, int ind, int color, FrameBuffer buffer, World world)` Draws a polygon's wireframe.
`void` | `execute(int mode, java.lang.Object[] params)` Executes the renderer specific function.
`VideoMode[]` | `getAvailableVideoModes()` Get all available video modes.
`void` | `init(int x, int y, int cbpp, int zbpp, int samples)` Initialize the renderer.
`boolean` | `isInitialized()` Returns true, if the Renderer has been initialized and false otherwise.
`void` | `setPaintListener(IPaintListener listener)` Sets a listener that will be called before the actual painting starts and after it has finished.

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Method Detail

### init

    public void init(int x,
                     int y,
                     int cbpp,
                     int zbpp,
                     int samples)

  Description copied from interface: `IRenderer`
  Initialize the renderer. This method is called by the FrameBuffer class and there should be no need to call it directly.

  Specified by:
    `init` in interface `IRenderer`
  Parameters:
    `x` - the width of the videomode/framebuffer
    `y` - the height of the videomode/framebuffer
    `cbpp` - the minimal colordepth
    `zbpp` - the minimal depthbuffer-depth
    `samples` - the number of samples to take when using multi sampling AA

### setPaintListener

    public void setPaintListener(IPaintListener listener)

  Description copied from interface: `IRenderer`
  Sets a listener that will be called before the actual painting starts and after it has finished.

  Specified by:
    `setPaintListener` in interface `IRenderer`
  Parameters:
    `listener` - IPaintListener the listener or null to remove it

### dispose

    public void dispose()

  Description copied from interface: `IRenderer`
  Disposes the renderer and all its resources if it's not used any longer. Will be called automatically if needed...there's no need to call it directly from inside an application.

  Specified by:
    `dispose` in interface `IRenderer`

### execute

    public void execute(int mode,
                        java.lang.Object[] params)

  Description copied from interface: `IRenderer`
  Executes the renderer specific function. As usual, there is no need to call this directly so the functions are not documented here.

  Specified by:
    `execute` in interface `IRenderer`
  Parameters:
    `mode` - the mode
    `params` - the parameters for this mode

### drawStrip

    public void drawStrip(VisList visList,
                          int ind,
                          int length,
                          FrameBuffer buffer,
                          World world)

  Description copied from interface: `IRenderer`
  Draws a triangle strip. No need to call this method directly.

  Specified by:
    `drawStrip` in interface `IRenderer`
  Parameters:
    `visList` - the VisibilityList
    `ind` - the index of the strip
    `length` - the length of the strip
    `buffer` - the current FrameBuffer
    `world` - the current instance of World

### drawVertexArray

    public void drawVertexArray(VisList visList,
                                int start,
                                int end,
                                FrameBuffer buffer,
                                World world)

  Description copied from interface: `IRenderer`
  Draws a vertex array. No need to call this method directly.

  Specified by:
    `drawVertexArray` in interface `IRenderer`
  Parameters:
    `visList` - the VisibilityList
    `start` - the index of the first polygon
    `end` - the index of the last polygon
    `buffer` - the current FrameBuffer
    `world` - the current instance of World

### drawPolygon

    public void drawPolygon(VisList visList,
                            int ind,
                            FrameBuffer buffer,
                            World world)

  Description copied from interface: `IRenderer`
  Draws a polygon. No need to call this method directly.

  Specified by:
    `drawPolygon` in interface `IRenderer`
  Parameters:
    `visList` - the VisibilityList
    `ind` - the index of the polygon
    `buffer` - the current FrameBuffer
    `world` - the current instance of World

### drawWireframe

    public void drawWireframe(VisList visList,
                              int ind,
                              int color,
                              FrameBuffer buffer,
                              World world)

  Description copied from interface: `IRenderer`
  Draws a polygon's wireframe. No need to call this method directly.

  Specified by:
    `drawWireframe` in interface `IRenderer`
  Parameters:
    `visList` - the VisibilityList
    `ind` - the index of the polygon
    `color` - the wireframe's color
    `buffer` - the current FrameBuffer

### getAvailableVideoModes

    public VideoMode[] getAvailableVideoModes()

  Description copied from interface: `IRenderer`
  Get all available video modes. Will be called from the FrameBuffer class when calling getVideoModes(int). For the OpenGL renderer, the returned z-buffer value is NOT what the driver tells but simply the value from Config.glZBufferDepth. The reason for this is, that LWJGL (which is used for the OpenGL binding) doesn't return this value anymore since version 0.6.

  Specified by:
    `getAvailableVideoModes` in interface `IRenderer`
  Returns:
    the video modes the renderer supports (only valid for OpenGL at the moment, software renderer will return an empty array).
  See Also:
    `FrameBuffer.getVideoModes(int)`

### isInitialized

    public boolean isInitialized()

  Description copied from interface: `IRenderer`
  Returns true, if the Renderer has been initialized and false otherwise.

  Specified by:
    `isInitialized` in interface `IRenderer`
  Returns:
    initialized...or not

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD