|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
jPCT supports different renderers in different modes. For the time being,
jPCT offers support for software rendering in legacy mode (default and equal
to every version prior to 0.83) and OpenGL mode (still software, but using
OpenGL's lighting model). In addition, jPCT offers support for hardware
acceleration via OpenGL by using the LWJGL.
Hardware OpenGL-support is available in OpenGL mode only.
Renderers can be enabled/disabled via the FrameBuffer class.
The methods defined by this Interface shouldn't be called directly by an
application.
FrameBuffer.enableRenderer(int,int)
,
FrameBuffer.disableRenderer(int)
,
FrameBuffer.enableGLCanvasRenderer()
Field Summary | |
static int |
MODE_LEGACY
The legacy jPCT lighting model should be used (valid for software mode only) |
static int |
MODE_OPENGL
The standard OpenGL lighting model should be used (default) |
static int |
RENDERER_OPENGL
jPCT should use hardware accelerated rendering using OpenGL |
static int |
RENDERER_SOFTWARE
jPCT should use software rendering (default) |
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. |
Field Detail |
public static final int RENDERER_SOFTWARE
public static final int RENDERER_OPENGL
public static final int MODE_OPENGL
public static final int MODE_LEGACY
Method Detail |
public void init(int x, int y, int cbpp, int zbpp, int samples)
x
- the width of the videomode/framebuffery
- the height of the videomode/framebuffercbpp
- the minimal colordepthzbpp
- the minimal depthbuffer-depthsamples
- the number of samples to take when using multi sampling AApublic void dispose()
public void drawPolygon(VisList visList, int ind, FrameBuffer buffer, World world)
visList
- the VisibilityListind
- the index of the polygonbuffer
- the current FrameBufferworld
- the current instance of Worldpublic void drawVertexArray(VisList visList, int start, int end, FrameBuffer buffer, World world)
visList
- the VisibilityListstart
- the index of the first polygonend
- the index of the last polygonbuffer
- the current FrameBufferworld
- the current instance of Worldpublic void drawStrip(VisList visList, int ind, int length, FrameBuffer buffer, World world)
visList
- the VisibilityListind
- the index of the striplength
- the length of the stripbuffer
- the current FrameBufferworld
- the current instance of Worldpublic void drawWireframe(VisList visList, int ind, int color, FrameBuffer buffer, World world)
visList
- the VisibilityListind
- the index of the polygoncolor
- the wireframe's colorbuffer
- the current FrameBufferpublic void execute(int mode, java.lang.Object[] params)
mode
- the modeparams
- the parameters for this modepublic VideoMode[] getAvailableVideoModes()
FrameBuffer.getVideoModes(int)
public boolean isInitialized()
public void setPaintListener(IPaintListener listener)
listener
- IPaintListener the listener or null to remove it
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |