Aviatrix3D
2.1.0

org.j3d.aviatrix3d.output.graphics
Class BaseRenderingProcessor

java.lang.Object
  extended by org.j3d.aviatrix3d.output.graphics.BaseRenderingProcessor
All Implemented Interfaces:
RenderingProcessor
Direct Known Subclasses:
DebugRenderingProcessor, ElumensRenderingProcessor, QuadBufferStereoProcessor, SingleEyeStereoProcessor, StandardRenderingProcessor

public abstract class BaseRenderingProcessor
extends java.lang.Object
implements RenderingProcessor

Common implementation for rendering handling to render for a single output device - be it on-screen or off.

Internationalisation Resource Names

Version:
$Revision: 3.69 $
Author:
Justin Couch, Alan Hudson

Field Summary
protected  java.util.ArrayList<OffscreenBufferRenderable> addedBuffers
          Child renderables that have just been added, but not processed yet.
protected  java.util.ArrayList<RenderingProcessor> addedProcessors
          Mirror list of the matching rendering processors for added buffers
protected  float alphaCutoff
          Alpha Test value for the parts of transparent objects that should be handled as opaque
protected  boolean alwaysLocalClear
          Flag to say if we the default clear colour should be used, or if there is at least one background that we can make use of
protected  java.lang.Integer[] availableClips
          Stack of the available OGL clip IDs that could be assigned to clips
protected  java.lang.Integer[] availableLights
          Stack of the available OGL light IDs that could be assigned to lights
protected  java.util.HashMap<OffscreenBufferRenderable,BaseBufferDescriptor> childBuffers
          Currently managed child buffers
protected  float[] clearColor
          The current clear colour
protected  org.j3d.util.IntHashMap clipIdMap
          Mapping of the object ID to it's used clip ID
protected  java.lang.Integer currentShaderProgramId
          The current program ID for GLSLang shaders.
protected  float[] currentViewport
          Data describing the current viewport if explicit values used
protected  GraphicsEnvironmentData[] environmentList
          Local storage of the environment data collections
protected  org.j3d.util.ErrorReporter errorReporter
          Error reporter used to send out messages
protected  float[] eyePoint
          The eye offset from the normal position
protected  boolean initComplete
          Flag indicating if any initialisation has been performed yet.
protected static java.lang.Integer INVALID_SHADER
          The invalid shader ID
protected  int lastClipIdx
          index in the availableClips list of the last available
protected  int lastLightIdx
          index in the availableLights list of the last available
protected  org.j3d.util.IntHashMap lightIdMap
          Mapping of the object ID to it's used light ID
protected  javax.media.opengl.GLContext localContext
          The context from the drawable
protected  int numRenderables
          Number of items in the renderable list
protected  int[] operationList
          Local storage of the nodes that need to be rendered
protected  GraphicsRequestData otherDataRequests
          Request object for deletions, shader stuff etc
protected  GraphicsOutputDevice ownerDevice
          The owner device of us.
protected  BaseBufferDescriptor ownerRenderable
          A reference to the containing renderable object that the contents of this rendering will be applied to.
protected  javax.media.opengl.GLContext parentContext
          The context from the drawable that is above us in the rendering
protected  java.util.ArrayList<OffscreenBufferRenderable> removedBuffers
          Child renderables that have been removed, but have not yet had their underlying resources deleted.
protected  GraphicsDetails[] renderableList
          Local storage of the nodes that need to be rendered
protected  boolean resetColor
          Flag to say that colour needs to be reset this frame
protected  boolean singleThreaded
          Single threaded rendering mode operation state.
protected  javax.vecmath.Matrix4f surfaceMatrix
          Combined view and projection matrix.
protected  boolean terminate
          Request that the current drawing terminate immediately.
protected  java.util.ArrayList<OffscreenBufferRenderable> updatedBuffers
          Child renderables that have just been added, but not processed yet.
protected  boolean useTwoPassTransparent
          Flag indicating if we should do single or two-pass rendering of transparent objects.
 
Constructor Summary
protected BaseRenderingProcessor(javax.media.opengl.GLContext parentCtx, GraphicsOutputDevice owner)
          Construct handler for rendering objects to the main screen.
 
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.
protected abstract  void display(GraphicsProfilingData profilingData)
          Called for each rendering loop.
 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.
protected  void init()
          Called by the drawable immediately after the OpenGL context is initialized or has changed; the GLContext has already been made current when this method is called.
 boolean isTwoPassTransparentEnabled()
          Check the state of the two pass transprent rendering flag.
protected  void postLayerEnvironmentDraw(javax.media.opengl.GL gl, GraphicsEnvironmentData data, GraphicsProfilingData profilingData)
          Complete the view environment setup at the end of the layer.
protected  void postMPPassEnvironmentDraw(javax.media.opengl.GL gl, GraphicsEnvironmentData data)
          Complete the view environment setup at the end of the layer.
protected  void preLayerEnvironmentDraw(javax.media.opengl.GL gl, GraphicsEnvironmentData data)
          Setup the view environment for a specific layer for drawing now.
protected  void preMPPassEnvironmentDraw(javax.media.opengl.GL gl, GraphicsEnvironmentData data)
          Setup the view environment for a specific pass of a multipass rendering for drawing now.
 EnableState prepareData()
          Perform the pre-rendering tasks now, including enabling the context for this buffer as needed.
protected  void processRequestData(javax.media.opengl.GL gl)
          Process the shader and delete requests for this scene now.
 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.
protected  void renderViewpoint(javax.media.opengl.GL gl, GraphicsEnvironmentData data)
          Render the viewpoint setup.
 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.
protected  void setupMultipassViewport(javax.media.opengl.GL gl, GraphicsEnvironmentData data)
          Setup the viewport environment to be drawn for a multipass rendering.
protected  void setupViewport(javax.media.opengl.GL gl, GraphicsEnvironmentData data)
          Setup the viewport environment to be drawn, but do not yet set up the viewpoint and other per-layer-specific effects.
 void swapBuffers()
          Cause the buffers of the underlying drawable to swap now.
protected  void terminateCleanup()
          If termination has been requested during the last call to the display loop, this method is called to destroy and cleanup the context instance.
 void updateChildBuffer(OffscreenBufferRenderable rend)
          Request that the given buffer gets updated.
protected  void updateContextChange()
          The GL class instance has changed due to reinitialising the context, so work through the list of current renderable items and reinitialise them.
protected  void updateProjectionMatrix(javax.media.opengl.GL gl, GraphicsEnvironmentData data)
          Update the projection matrix.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

INVALID_SHADER

protected static final java.lang.Integer INVALID_SHADER
The invalid shader ID


ownerDevice

protected GraphicsOutputDevice ownerDevice
The owner device of us. Used to send out messages


clearColor

protected float[] clearColor
The current clear colour


resetColor

protected boolean resetColor
Flag to say that colour needs to be reset this frame


alphaCutoff

protected float alphaCutoff
Alpha Test value for the parts of transparent objects that should be handled as opaque


useTwoPassTransparent

protected boolean useTwoPassTransparent
Flag indicating if we should do single or two-pass rendering of transparent objects.


renderableList

protected GraphicsDetails[] renderableList
Local storage of the nodes that need to be rendered


operationList

protected int[] operationList
Local storage of the nodes that need to be rendered


numRenderables

protected int numRenderables
Number of items in the renderable list


environmentList

protected GraphicsEnvironmentData[] environmentList
Local storage of the environment data collections


otherDataRequests

protected GraphicsRequestData otherDataRequests
Request object for deletions, shader stuff etc


currentShaderProgramId

protected java.lang.Integer currentShaderProgramId
The current program ID for GLSLang shaders.


availableLights

protected java.lang.Integer[] availableLights
Stack of the available OGL light IDs that could be assigned to lights


lastLightIdx

protected int lastLightIdx
index in the availableLights list of the last available


lightIdMap

protected org.j3d.util.IntHashMap lightIdMap
Mapping of the object ID to it's used light ID


availableClips

protected java.lang.Integer[] availableClips
Stack of the available OGL clip IDs that could be assigned to clips


lastClipIdx

protected int lastClipIdx
index in the availableClips list of the last available


clipIdMap

protected org.j3d.util.IntHashMap clipIdMap
Mapping of the object ID to it's used clip ID


alwaysLocalClear

protected boolean alwaysLocalClear
Flag to say if we the default clear colour should be used, or if there is at least one background that we can make use of


surfaceMatrix

protected javax.vecmath.Matrix4f surfaceMatrix
Combined view and projection matrix. This used to be set in setEnvironmentData when we had a single one. Now there is one per layer and we need to do something about it.


eyePoint

protected float[] eyePoint
The eye offset from the normal position


currentViewport

protected float[] currentViewport
Data describing the current viewport if explicit values used


initComplete

protected boolean initComplete
Flag indicating if any initialisation has been performed yet. Sometimes we can get into situations where the GL context is already valid, but we don't get the NEW context status being reported. If we haven't initialised ourselves at this point, then we really need to, to stop crashing.


terminate

protected boolean terminate
Request that the current drawing terminate immediately. App closing


errorReporter

protected org.j3d.util.ErrorReporter errorReporter
Error reporter used to send out messages


parentContext

protected javax.media.opengl.GLContext parentContext
The context from the drawable that is above us in the rendering


localContext

protected javax.media.opengl.GLContext localContext
The context from the drawable


singleThreaded

protected boolean singleThreaded
Single threaded rendering mode operation state. Defaults to false.


ownerRenderable

protected BaseBufferDescriptor ownerRenderable
A reference to the containing renderable object that the contents of this rendering will be applied to. If this is the main canvas then the reference will be null.


addedBuffers

protected java.util.ArrayList<OffscreenBufferRenderable> addedBuffers
Child renderables that have just been added, but not processed yet. These will be processed in the next frame and have buffers allocated.


addedProcessors

protected java.util.ArrayList<RenderingProcessor> addedProcessors
Mirror list of the matching rendering processors for added buffers


updatedBuffers

protected java.util.ArrayList<OffscreenBufferRenderable> updatedBuffers
Child renderables that have just been added, but not processed yet. These will be processed in the next frame and have buffers allocated.


childBuffers

protected java.util.HashMap<OffscreenBufferRenderable,BaseBufferDescriptor> childBuffers
Currently managed child buffers


removedBuffers

protected java.util.ArrayList<OffscreenBufferRenderable> removedBuffers
Child renderables that have been removed, but have not yet had their underlying resources deleted. Will be processed at the next frame.

Constructor Detail

BaseRenderingProcessor

protected BaseRenderingProcessor(javax.media.opengl.GLContext parentCtx,
                                 GraphicsOutputDevice owner)
Construct handler for rendering objects to the main screen.

Parameters:
parentCtx - The parent GL context to the surface that holds this processor.
owner - The owning device of this processor
Method Detail

setErrorReporter

public 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. Setting a value of null will clear the currently set reporter. If one is already set, the new value replaces the old.

Specified by:
setErrorReporter in interface RenderingProcessor
Parameters:
reporter - The instance to use or null

halt

public void halt()
Force a halt of the current processing. Any processing in progress should exit immediately. Used to abort the current scene processing due to application shutdown.

Specified by:
halt in interface RenderingProcessor

setClearColor

public 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. Colours range from 0 to 1 in the normal manner.

Specified by:
setClearColor in interface RenderingProcessor
Parameters:
r - The red component of the background clear colour
g - The green component of the background clear colour
b - The blue component of the background clear colour
a - The alpha component of the background clear colour

setColorClearNeeded

public void setColorClearNeeded(boolean state)
Set whether we should always force a local colour clear before beginning any drawing. If this is set to false, then we can assume that there is at least one background floating around that we can use to clear whatever was drawn in the previous frame, and so we can ignore the glClear(GL.GL_COLOR_BUFFER_BIT) call. The default is set to true.

Specified by:
setColorClearNeeded in interface RenderingProcessor
Parameters:
state - true if we should always locally clear first

enableTwoPassTransparentRendering

public void enableTwoPassTransparentRendering(boolean state)
Enable or disable two pass rendering of transparent objects. By default it is disabled.

Specified by:
enableTwoPassTransparentRendering in interface RenderingProcessor
Parameters:
state - true if we should enable two pass rendering

isTwoPassTransparentEnabled

public boolean isTwoPassTransparentEnabled()
Check the state of the two pass transprent rendering flag.

Specified by:
isTwoPassTransparentEnabled in interface RenderingProcessor
Returns:
true if two pass rendering of transparent objects is enabled

setAlphaTestCutoff

public 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. The default value is 1.0. No sanity checking is performed, but the value should be between [0,1].

Specified by:
setAlphaTestCutoff in interface RenderingProcessor
Parameters:
cutoff - The alpha value at which to enable rendering

getAlphaTestCutoff

public float getAlphaTestCutoff()
Get the current value of the alpha test cutoff number. Will always return the currently set number regardless of the state of the two pass rendering flag.

Specified by:
getAlphaTestCutoff in interface RenderingProcessor
Returns:
The currently set cut off value

setDrawableObjects

public void setDrawableObjects(GraphicsRequestData otherData,
                               GraphicsDetails[] nodes,
                               int[] renderOps,
                               int numValid,
                               GraphicsEnvironmentData[] envData)
Update the list of items to be rendered to the current list. Draw them at the next oppourtunity.

Specified by:
setDrawableObjects in interface RenderingProcessor
Parameters:
nodes - The list of nodes in sorted order
renderOps - Operation to perform on each node
numValid - The number of valid items in the array
envData - environment data to be rendered with this scene
otherData - data to be processed before the rendering

prepareData

public EnableState prepareData()
Perform the pre-rendering tasks now, including enabling the context for this buffer as needed.

Specified by:
prepareData in interface RenderingProcessor
Returns:
either The enable was good, a reinitialisation was performed or it failed completely.

reinitialize

public void reinitialize()
In the prepare data call, it was found that the GL context had been reinitialised. So, pass through all the current geometry now and reinitialise everything that needs it.

Specified by:
reinitialize in interface RenderingProcessor

render

public boolean render(GraphicsProfilingData profilingData)
Draw to the drawable now. This causes the drawable's context to be made current and the GL commands are issued. Derived classes should not override this method, instead they should use the display() or init() methods as needed.

Specified by:
render in interface RenderingProcessor
Parameters:
profilingData - The timing and load data
Returns:
false if the rendering should not continue

swapBuffers

public void swapBuffers()
Cause the buffers of the underlying drawable to swap now.

Specified by:
swapBuffers in interface RenderingProcessor

enableSingleThreaded

public void enableSingleThreaded(boolean state)
Notification that this surface is being drawn to with a single thread. This can be used to optmise internal state handling when needed in a single versus multithreaded environment.

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.

Specified by:
enableSingleThreaded in interface RenderingProcessor
Parameters:
state - true if the device can expect single threaded behaviour

disposeSingleThreadResources

public void disposeSingleThreadResources()
If the output device is marked as single threaded, this instructs the device that the current rendering thread has exited. Next time the draw method is called, a new rendering context will need to be created for a new incoming thread instance. Also, if any other per-thread resources are around, clean those up now. This is called just before that thread exits.

Specified by:
disposeSingleThreadResources in interface RenderingProcessor

getSurfaceToVWorld

public 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. The coordinate system is in the window-system interface: The x,y position is the lower left corner, with height going up the screen and width heading to the right.

Specified by:
getSurfaceToVWorld in interface RenderingProcessor
Parameters:
x - The X coordinate on the surface
y - The Y coordinate on the surface
matrix - The matrix to copy into It must be preallocated.
layer - The layer ID to fetch from. Layer 0 is the front-most
subLayer - The ID of the viewport-layer that is needed. If there are no sub-layers, use 0.
deviceId - A user-defined identifier for the requesting device when using the lastFound items
useLastFound - Should we skip the search process and use the last data found for this layer/sublayer combo.
Returns:
Whether the coordinates where on the layer

getPixelLocationInSurface

public 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. The coordinate system is in the window-system interface: The x,y position is the lower left corner, with height going up the screen and width heading to the right.

Specified by:
getPixelLocationInSurface in interface RenderingProcessor
Parameters:
x - The X coordinate
y - The Y coordinate
layer - The layer ID to fetch from. Layer 0 is the front-most
subLayer - 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 items
useLastFound - Should we skip the search process and use the last data found for this layer/sublayer combo.
Returns:
Whether the coordinates where on the layer

getCenterEyeInSurface

public 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.

Specified by:
getCenterEyeInSurface in interface RenderingProcessor
Parameters:
x - The X coordinate on the surface
y - The Y coordinate on the surface
position - The current eye position. It must be preallocated.
layer - The layer ID to fetch from. Layer 0 is the front-most
deviceId - A user-defined identifier for the requesting device when using the lastFound items
useLastFound - Should we skip the search process and use the last data found for this layer/sublayer combo.
subLayer - The ID of the viewport-layer that is needed. If there are no sub-layers, use 0.
Returns:
Whether the coordinates where on the layer

setOwnerBuffer

public void setOwnerBuffer(BaseBufferDescriptor desc)
Set the buffer descriptor that represents the surface that this renderer works with. Can be used to enable and disable the buffer at the appropriate time for rendering.

Specified by:
setOwnerBuffer in interface RenderingProcessor
Parameters:
desc - The descriptor of the buffer that this renders to

addChildBuffer

public void addChildBuffer(OffscreenBufferRenderable rend,
                           RenderingProcessor proc)
Add a dependent child rendering buffer to this processor. If it is already a current child, it will ignore the request.

Specified by:
addChildBuffer in interface RenderingProcessor
Parameters:
rend - The renderable instance to be updated
proc - The processor associated with the renderable

updateChildBuffer

public void updateChildBuffer(OffscreenBufferRenderable rend)
Request that the given buffer gets updated.

Specified by:
updateChildBuffer in interface RenderingProcessor
Parameters:
rend - The renderable instance to be added

removeChildBuffer

public void removeChildBuffer(OffscreenBufferRenderable rend)
Remove a dependent child rendering buffer to this processor. If it is not a current child, it will ignore the request.

Specified by:
removeChildBuffer in interface RenderingProcessor
Parameters:
rend - The renderable instance to be added

addSurfaceInfoListener

public void addSurfaceInfoListener(SurfaceInfoListener l)
Add a surface info listener instance to this surface. Duplicate listener instance add requests are ignored, as are null values.

Specified by:
addSurfaceInfoListener in interface RenderingProcessor
Parameters:
l - The new listener instance to add

removeSurfaceInfoListener

public void removeSurfaceInfoListener(SurfaceInfoListener l)
Remove a surface info listener from this surface. If the listener is not currently registered the request is ignored.

Specified by:
removeSurfaceInfoListener in interface RenderingProcessor
Parameters:
l - The listener instance to remove

display

protected abstract void display(GraphicsProfilingData profilingData)
Called for each rendering loop. The derived class should now perform the rendering that they need to do for the given type of renderer. The context is made current before this call and is made non current after this call. Derived code does not need to worry about context state handling.

Parameters:
profilingData - The timing and load data

init

protected void init()
Called by the drawable immediately after the OpenGL context is initialized or has changed; the GLContext has already been made current when this method is called.


processRequestData

protected void processRequestData(javax.media.opengl.GL gl)
Process the shader and delete requests for this scene now. Should normally be called at the start of the frame to ensure IDs are deleted up front before being reallocated elsewhere.

Parameters:
gl - The GL context to process the requests with

terminateCleanup

protected void terminateCleanup()
If termination has been requested during the last call to the display loop, this method is called to destroy and cleanup the context instance. Once called, this instance can no longer be used.


setupViewport

protected void setupViewport(javax.media.opengl.GL gl,
                             GraphicsEnvironmentData data)
Setup the viewport environment to be drawn, but do not yet set up the viewpoint and other per-layer-specific effects. If a viewport has multiple layers, then each layer could potentially have a different viewpoint etc.

Parameters:
gl - The gl context to draw with
data - The view environment information to setup

setupMultipassViewport

protected void setupMultipassViewport(javax.media.opengl.GL gl,
                                      GraphicsEnvironmentData data)
Setup the viewport environment to be drawn for a multipass rendering. The difference between this and the normal viewport setup is that this always assumes starting at 0,0 and just uses the width and height to setup the bounds. It is assuming rendering to one of the auxillary buffers rather than the main back buffer.

Parameters:
gl - The gl context to draw with
data - The view environment information to setup

preLayerEnvironmentDraw

protected void preLayerEnvironmentDraw(javax.media.opengl.GL gl,
                                       GraphicsEnvironmentData data)
Setup the view environment for a specific layer for drawing now. This calls the render effects processor, draws the background, initiates the viewpoint, frustum etc.

Parameters:
gl - The gl context to draw with
data - The view environment information to setup

postLayerEnvironmentDraw

protected void postLayerEnvironmentDraw(javax.media.opengl.GL gl,
                                        GraphicsEnvironmentData data,
                                        GraphicsProfilingData profilingData)
Complete the view environment setup at the end of the layer. This disables any fog, the current viewpoint and the post draw action on the render effects processor.

Parameters:
gl - The gl context to draw with
data - The view environment information to setup
profilingData - The timing and load data

preMPPassEnvironmentDraw

protected void preMPPassEnvironmentDraw(javax.media.opengl.GL gl,
                                        GraphicsEnvironmentData data)
Setup the view environment for a specific pass of a multipass rendering for drawing now. This calls the multipass observer, and initiates the viewpoint, frustum etc. Backgrounds are not drawn.

Parameters:
gl - The gl context to draw with
data - The view environment information to setup

postMPPassEnvironmentDraw

protected void postMPPassEnvironmentDraw(javax.media.opengl.GL gl,
                                         GraphicsEnvironmentData data)
Complete the view environment setup at the end of the layer. This disables any fog, the current viewpoint and the post draw action on the render effects processor.

Parameters:
gl - The gl context to draw with
data - The view environment information to setup

renderViewpoint

protected void renderViewpoint(javax.media.opengl.GL gl,
                               GraphicsEnvironmentData data)
Render the viewpoint setup.

Parameters:
gl - The gl context to draw with
data - The view environment information to setup

updateProjectionMatrix

protected void updateProjectionMatrix(javax.media.opengl.GL gl,
                                      GraphicsEnvironmentData data)
Update the projection matrix.

Parameters:
gl - The gl context to draw with
data - The view environment information to setup

updateContextChange

protected void updateContextChange()
The GL class instance has changed due to reinitialising the context, so work through the list of current renderable items and reinitialise them.


Aviatrix3D
2.1.0

Latest Info from http://aviatrix3d.j3d.org/
Copyright © 2003 - 2009 j3d.org