|
Aviatrix3D 2.1.0 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface RenderingProcessor
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 |
addChildBuffer(OffscreenBufferRenderable rend,
RenderingProcessor proc)
Add a dependent child rendering buffer to this processor. |
void |
addSurfaceInfoListener(SurfaceInfoListener l)
Add a surface info listener instance to this surface. |
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. |
void |
enableTwoPassTransparentRendering(boolean state)
Enable or disable two pass rendering of transparent objects. |
float |
getAlphaTestCutoff()
Get the current value of the alpha test cutoff number. |
boolean |
getCenterEyeInSurface(int x,
int y,
int layer,
int subLayer,
javax.vecmath.Point3f position,
java.lang.String deviceId,
boolean useLastFound)
Get the Center Eye position in surface coordinates. |
boolean |
getPixelLocationInSurface(int x,
int y,
int layer,
int subLayer,
javax.vecmath.Point3f position,
java.lang.String deviceId,
boolean useLastFound)
Convert a pixel location to surface coordinates. |
boolean |
getSurfaceToVWorld(int x,
int y,
int layer,
int subLayer,
javax.vecmath.Matrix4f matrix,
java.lang.String deviceId,
boolean useLastFound)
Get the surface to VWorld transformation matrix. |
void |
halt()
Force a halt of the current processing. |
boolean |
isTwoPassTransparentEnabled()
Check the state of the two pass transprent rendering flag. |
EnableState |
prepareData()
Perform the pre-rendering tasks now, including enabling the context for this buffer as needed. |
void |
reinitialize()
In the prepare data call, it was found that the GL context had been reinitialised. |
void |
removeChildBuffer(OffscreenBufferRenderable rend)
Remove a dependent child rendering buffer to this processor. |
void |
removeSurfaceInfoListener(SurfaceInfoListener l)
Remove a surface info listener from this surface. |
boolean |
render(GraphicsProfilingData profilingData)
Draw to the drawable now. |
void |
setAlphaTestCutoff(float cutoff)
If two pass rendering of transparent objects is enabled, this is the alpha test value used when deciding what to render. |
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(GraphicsRequestData otherData,
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 |
setOwnerBuffer(BaseBufferDescriptor desc)
Set the buffer descriptor that represents the surface that this renderer works with. |
void |
swapBuffers()
Cause the buffers of the underlying drawable to swap now. |
void |
updateChildBuffer(OffscreenBufferRenderable rend)
Request that the given buffer gets updated. |
Method Detail |
---|
void setErrorReporter(org.j3d.util.ErrorReporter reporter)
reporter
- The instance to use or nullvoid 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 colourvoid setColorClearNeeded(boolean state)
state
- true if we should always locally clear firstvoid enableTwoPassTransparentRendering(boolean state)
state
- true if we should enable two pass renderingboolean isTwoPassTransparentEnabled()
void setAlphaTestCutoff(float cutoff)
cutoff
- The alpha value at which to enable renderingfloat getAlphaTestCutoff()
void setDrawableObjects(GraphicsRequestData otherData, GraphicsDetails[] nodes, int[] renderOps, int numValid, GraphicsEnvironmentData[] envData)
otherData
- data to be processed before the renderingnodes
- 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 scenevoid setOwnerBuffer(BaseBufferDescriptor desc)
desc
- The descriptor of the buffer that this renders tovoid addChildBuffer(OffscreenBufferRenderable rend, RenderingProcessor proc)
rend
- The renderable instance to be addedproc
- The processor associated with the renderablevoid updateChildBuffer(OffscreenBufferRenderable rend)
rend
- The renderable instance to be addedvoid removeChildBuffer(OffscreenBufferRenderable rend)
rend
- The renderable instance to be addedEnableState prepareData()
void reinitialize()
boolean render(GraphicsProfilingData profilingData)
profilingData
- The timing and load data
void swapBuffers()
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 behaviourvoid disposeSingleThreadResources()
boolean getSurfaceToVWorld(int x, int y, int layer, int subLayer, javax.vecmath.Matrix4f matrix, java.lang.String deviceId, boolean useLastFound)
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 intodeviceId
- A user-defined identifier for the requesting device when
using the lastFound itemsuseLastFound
- Should we skip the search process and use the last
data found for this layer/sublayer combo.
boolean getPixelLocationInSurface(int x, int y, int layer, int subLayer, javax.vecmath.Point3f position, java.lang.String deviceId, boolean useLastFound)
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.deviceId
- A user-defined identifier for the requesting device when
using the lastFound itemsuseLastFound
- Should we skip the search process and use the last
data found for this layer/sublayer combo.
boolean getCenterEyeInSurface(int x, int y, int layer, int subLayer, javax.vecmath.Point3f position, java.lang.String deviceId, boolean useLastFound)
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.deviceId
- A user-defined identifier for the requesting device when
using the lastFound itemsuseLastFound
- Should we skip the search process and use the last
data found for this layer/sublayer combo.
void halt()
void addSurfaceInfoListener(SurfaceInfoListener l)
l
- The new listener instance to addvoid removeSurfaceInfoListener(SurfaceInfoListener l)
l
- The listener instance to remove
|
Aviatrix3D 2.1.0 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |