Aviatrix3D
2.0 Beta 2

org.j3d.aviatrix3d
Interface PBufferTextureSource

All Superinterfaces:
OffscreenTextureSource, TextureSource
All Known Implementing Classes:
OffscreenTexture2D

public interface PBufferTextureSource
extends OffscreenTextureSource

Marker describing a texture that is rendered to an offscreen buffer, using OpenGL pBuffers.

Internally the system will use a pBuffer to render this texture source to a complete rendered scene. As such, this represents a complete rendered system of layers, multipass rendering and normal capabilties.

Version:
$Revision: 1.4 $
Author:
Justin Couch

Field Summary
 
Fields inherited from interface org.j3d.aviatrix3d.TextureSource
FORMAT_BGR, FORMAT_BGRA, FORMAT_INTENSITY_ALPHA, FORMAT_RGB, FORMAT_RGBA, FORMAT_SINGLE_COMPONENT
 
Method Summary
 javax.media.opengl.GLPbuffer getBuffer(java.lang.Object obj)
          Get the currently registered pBuffer for the given key object.
 javax.media.opengl.GLCapabilities getGLSetup()
          Get the requested buffer setup that describes this offscreen texture.
 void getLayers(Layer[] layers)
          Fetch the current layers that are set.
 int numLayers()
          Get the number of layers that are currently set.
 void registerBuffer(java.lang.Object obj, javax.media.opengl.GLPbuffer buffer)
          Register a pBuffer for a given key object.
 void setLayers(Layer[] layers, int numLayers)
          Set the collection of geometry that should be rendered to this texture.
 void unregisterBuffer(java.lang.Object obj)
          Remove an already registered pBuffer for a given key object.
 
Methods inherited from interface org.j3d.aviatrix3d.OffscreenTextureSource
getClearColor, getHeight, isRepaintRequired
 
Methods inherited from interface org.j3d.aviatrix3d.TextureSource
getFormat, getNumLevels, getWidth
 

Method Detail

setLayers

public void setLayers(Layer[] layers,
                      int numLayers)
               throws InvalidWriteTimingException,
                      CyclicSceneGraphStructureException
Set the collection of geometry that should be rendered to this texture. The geometry is, in effect, a completely separate rendarable space, with it's own culling and sorting pass. In addition, a check is made to make sure that no cyclic scene graph structures are created, as this can create really major headachesfor nested surface rendering. A null value will clear the current geometry and result in only rendering the background, if set. if not set, then whatever the default colour is, is used (typically black).

Parameters:
layers - The collection of layers, in order, to render
numLayers - The number of valid layers to use
Throws:
CyclicSceneGraphStructureException - Equal parent and child
InvalidWriteTimingException - An attempt was made to write outside of the NodeUpdateListener callback method

numLayers

public int numLayers()
Get the number of layers that are currently set. If no layers are set, or a scene is set, this will return zero.

Returns:
a value greater than or equal to zero

getLayers

public void getLayers(Layer[] layers)
               throws java.lang.IllegalArgumentException
Fetch the current layers that are set. The values will be copied into the user-provided array. That array must be at least numLayers() in length. If not, this method does nothing (the provided array will be unchanged).

Parameters:
layers - An array to copy the values into
Throws:
java.lang.IllegalArgumentException - The array provided is too small or null

getGLSetup

public javax.media.opengl.GLCapabilities getGLSetup()
Get the requested buffer setup that describes this offscreen texture.

Returns:
The defined capabilities setup for the texture

getBuffer

public javax.media.opengl.GLPbuffer getBuffer(java.lang.Object obj)
Get the currently registered pBuffer for the given key object. If there is no buffer registered for the current context, return null.

Parameters:
obj - The key used to register the buffer with
Returns:
buffer The buffer instance to use here.

registerBuffer

public void registerBuffer(java.lang.Object obj,
                           javax.media.opengl.GLPbuffer buffer)
Register a pBuffer for a given key object.

Parameters:
obj - The key used to register the buffer with
buffer - The buffer instance to use here.

unregisterBuffer

public void unregisterBuffer(java.lang.Object obj)
Remove an already registered pBuffer for a given key object.

Parameters:
obj - The key used to register the buffer with

Aviatrix3D
2.0 Beta 2

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