|
Aviatrix3D 2.1.0 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.j3d.aviatrix3d.output.graphics.BaseSurface org.j3d.aviatrix3d.output.graphics.BaseAWTSurface
public abstract class BaseAWTSurface
Implementation of the most basic drawable surface extended to provide AWT-specific features.
Field Summary | |
---|---|
protected boolean |
lightweight
Flag indicating if we're a lightweight surface or not |
protected org.j3d.aviatrix3d.output.graphics.AWTResizeHandler |
resizer
Handler for dealing with the AWT to our graphics resize handler |
Fields inherited from class org.j3d.aviatrix3d.output.graphics.BaseSurface |
---|
alphaCutoff, canCreatePBuffers, canvas, canvasContext, canvasDescriptor, canvasRenderer, errorReporter, FAILED_CONTEXT_MSG, initComplete, numRenderables, renderableList, rendererMap, sharedSurface, singleThreaded, surfaceMonitor, terminate, useTwoPassTransparent |
Fields inherited from interface org.j3d.aviatrix3d.pipeline.graphics.GraphicsOutputDevice |
---|
ALTERNATE_FRAME_STEREO, NO_STEREO, QUAD_BUFFER_STEREO, TWO_CANVAS_STEREO |
Constructor Summary | |
---|---|
protected |
BaseAWTSurface(BaseSurface sharedWith,
boolean lightweight)
Construct a surface shares it's GL context with the given surface. |
Method Summary | |
---|---|
void |
addGraphicsResizeListener(GraphicsResizeListener l)
Add a resize listener instance to this surface. |
protected abstract boolean |
createLightweightContext()
Attempt to create a new lightweight canvas renderer now. |
boolean |
draw(ProfilingData profilingData)
Instruct the surface to draw the collected set of nodes now. |
void |
removeGraphicsResizeListener(GraphicsResizeListener l)
Remove a resize listener from this surface. |
void |
setDrawableObjects(GraphicsRequestData otherData,
GraphicsInstructions[] commands,
int numValid)
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 |
swap()
Swap the buffers now if the surface supports multiple buffer drawing. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.j3d.aviatrix3d.pipeline.OutputDevice |
---|
getSurfaceObject |
Field Detail |
---|
protected org.j3d.aviatrix3d.output.graphics.AWTResizeHandler resizer
protected final boolean lightweight
Constructor Detail |
---|
protected BaseAWTSurface(BaseSurface sharedWith, boolean lightweight)
If the sharedWith parameter is null, then this is just treated as an ordinary non-shared frame. The return flag will be set appropriately.
sharedWith
- The surface that you'd like this surface to share
the GL context with, if possible. May be null.lightweight
- If true, uses a GLJPanel (lightweight) JComponent,
otherwise a GLCanvas. Note that setting this to true could negatively
impact performance.Method Detail |
---|
public void setErrorReporter(org.j3d.util.ErrorReporter reporter)
setErrorReporter
in interface OutputDevice
setErrorReporter
in class BaseSurface
reporter
- The instance to use or nullpublic void addGraphicsResizeListener(GraphicsResizeListener l)
l
- The new listener instance to addpublic void removeGraphicsResizeListener(GraphicsResizeListener l)
l
- The listener instance to removepublic void setDrawableObjects(GraphicsRequestData otherData, GraphicsInstructions[] commands, int numValid)
setDrawableObjects
in interface GraphicsOutputDevice
setDrawableObjects
in class BaseSurface
otherData
- data to be processed before the renderingcommands
- The list of drawable surfaces to rendernumValid
- The number of valid items in the arraypublic void swap()
swap
in interface GraphicsOutputDevice
swap
in class BaseSurface
public boolean draw(ProfilingData profilingData)
The return value indicates success or failure in the ability to render this frame. Typically it will indicate failure if the underlying surface has been disposed of, either directly through the calling of the method on this interface, or through an internal check mechanism. If failure is indicated, then check to see if the surface has been disposed of and discontinue rendering if it has.
draw
in interface OutputDevice
draw
in class BaseSurface
profilingData
- The timing and load data
protected abstract boolean createLightweightContext()
|
Aviatrix3D 2.1.0 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |