|
Aviatrix3D 2.0 Beta 2 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Handles the rendering for a single output device - be it on-screen or off.
The code expects that everything is set up before each call of the display() callback. It does not handle any recursive rendering requests as that is assumed to have been sorted out before calling this renderer.
Method Summary | |
void |
disposeSingleThreadResources()
If the output device is marked as single threaded, this instructs the device that the current rendering thread has exited. |
void |
enableSingleThreaded(boolean state)
Notification that this surface is being drawn to with a single thread. |
boolean |
getCenterEyeInSurface(int x,
int y,
int layer,
int subLayer,
javax.vecmath.Point3f position)
Get the Center Eye position in surface coordinates. |
boolean |
getPixelLocationInSurface(int x,
int y,
int layer,
int subLayer,
javax.vecmath.Point3f position)
Convert a pixel location to surface coordinates. |
boolean |
getSurfaceToVWorld(int x,
int y,
int layer,
int subLayer,
javax.vecmath.Matrix4f matrix)
Get the surface to VWorld transformation matrix. |
void |
halt()
Force a halt of the current processing. |
void |
queueDeletedObject(DeletableRenderable obj)
An object has been detected as being deleted (no internal or external references to it left) and it needs to be cleaned up. |
void |
queueShaderRequests(ShaderSourceRenderable[] initList,
int numInit,
ShaderSourceRenderable[] logList,
int numLog)
Queue up a collection of shader objects for processing on the next frame. |
boolean |
render()
Draw to the drawable now. |
void |
setClearColor(float r,
float g,
float b,
float a)
Set the background colour that this surface should be cleared to before the drawing step. |
void |
setColorClearNeeded(boolean state)
Set whether we should always force a local colour clear before beginning any drawing. |
void |
setDrawableObjects(GraphicsDetails[] nodes,
int[] renderOps,
int numValid,
GraphicsEnvironmentData[] envData)
Update the list of items to be rendered to the current list. |
void |
setErrorReporter(org.j3d.util.ErrorReporter reporter)
Register an error reporter with the engine so that any errors generated by the node's internals can be reported in a nice, pretty fashion. |
void |
swapBuffers()
Cause the buffers of the underlying drawable to swap now. |
Method Detail |
public void setErrorReporter(org.j3d.util.ErrorReporter reporter)
reporter
- The instance to use or nullpublic void queueDeletedObject(DeletableRenderable obj)
cleanup()
method called and then the
reference to it should be discarded.
obj
- The object to queue up for deletionpublic void queueShaderRequests(ShaderSourceRenderable[] initList, int numInit, ShaderSourceRenderable[] logList, int numLog)
initList
- The shaders needing initialisationnumInit
- The number of shaders needing initialisationlogList
- The shaders needing log fetchingnumLog
- The number of shaders needing log fetchingpublic void setClearColor(float r, float g, float b, float a)
r
- The red component of the background clear colourg
- The green component of the background clear colourb
- The blue component of the background clear coloura
- The alpha component of the background clear colourpublic void setColorClearNeeded(boolean state)
state
- true if we should always locally clear firstpublic void setDrawableObjects(GraphicsDetails[] nodes, int[] renderOps, int numValid, GraphicsEnvironmentData[] envData)
nodes
- The list of nodes in sorted orderrenderOps
- Operation to perform on each nodenumValid
- The number of valid items in the arrayenvData
- environment data to be rendered with this scenepublic boolean render()
public void swapBuffers()
public void enableSingleThreaded(boolean state)
This method should never be called by end user code. It is purely for
the purposes of the RenderManager
to inform the device about what state it can expect.
state
- true if the device can expect single threaded behaviourpublic void disposeSingleThreadResources()
public boolean getSurfaceToVWorld(int x, int y, int layer, int subLayer, javax.vecmath.Matrix4f matrix)
x
- The X coordinate in the entire surfacey
- The Y coordinate in the entire surfacelayer
- The layer ID to fetch from. Layer 0 is the front-mostsubLayer
- The ID of the viewport-layer that is needed. If there
are no sub-layers, use 0.matrix
- The matrix to copy into
public boolean getPixelLocationInSurface(int x, int y, int layer, int subLayer, javax.vecmath.Point3f position)
x
- The X coordinate in the entire surfacey
- The Y coordinate in the entire surfacelayer
- The layer ID to fetch from. Layer 0 is the front-mostsubLayer
- The ID of the viewport-layer that is needed. If there
are no sub-layers, use 0.position
- The converted position. It must be preallocated.
public boolean getCenterEyeInSurface(int x, int y, int layer, int subLayer, javax.vecmath.Point3f position)
x
- The X coordinate in the entire surfacey
- The Y coordinate in the entire surfacelayer
- The layer ID to fetch from. Layer 0 is the front-mostsubLayer
- The ID of the viewport-layer that is needed. If there
are no sub-layers, use 0.position
- The current eye position. It must be preallocated.
public void halt()
|
Aviatrix3D 2.0 Beta 2 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |