j3d.org Aviatrix3D

org.j3d.aviatrix3d
Interface MultipassTextureSource

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

public interface MultipassTextureSource
extends OffscreenTextureSource

Marker describing a texture source that that is rendered to the main surface using a multipass technique.

In a multipass source, the drawn surface still needs to conform to the power of 2 size requirements. Since the viewport for the window is almost guaranteed not to be a power of two, the user must make sure that they set an explicit, correct, viewport size through the ViewEnvironment provided with the scene.

Version:
$Revision: 1.1 $
Author:
Justin Couch

Field Summary
static int ACCUMULATION_BUFFER
          The bitmask indicating the accumulation buffer is used.
static int COLOR_BUFFER
          The bitmask indicating the colour buffer is used.
static int DEPTH_BUFFER
          The bitmask indicating the depth buffer is used.
static int STENCIL_BUFFER
          The bitmask indicating the stencil buffer is used.
 
Fields inherited from interface org.j3d.aviatrix3d.TextureSource
FORMAT_BGR, FORMAT_BGRA, FORMAT_INTENSITY_ALPHA, FORMAT_RGB, FORMAT_RGBA, FORMAT_SINGLE_COMPONENT
 
Method Summary
 MultipassRenderObserver getRenderObserver()
          Fetch the observer instance that may be associated with the texture source.
 int getUsedBuffers()
          Get the list of buffers that are required to be rendered by this source.
 void setNumLevels(int numLevels)
          Set the number of levels of mipmap generation that should be rendered.
 
Methods inherited from interface org.j3d.aviatrix3d.OffscreenTextureSource
getClearColor, getHeight, getRenderedScene, isRepaintRequired, setRenderedScene
 
Methods inherited from interface org.j3d.aviatrix3d.TextureSource
getFormat, getNumLevels, getWidth
 

Field Detail

COLOR_BUFFER

public static final int COLOR_BUFFER
The bitmask indicating the colour buffer is used.

See Also:
Constant Field Values

DEPTH_BUFFER

public static final int DEPTH_BUFFER
The bitmask indicating the depth buffer is used.

See Also:
Constant Field Values

STENCIL_BUFFER

public static final int STENCIL_BUFFER
The bitmask indicating the stencil buffer is used.

See Also:
Constant Field Values

ACCUMULATION_BUFFER

public static final int ACCUMULATION_BUFFER
The bitmask indicating the accumulation buffer is used.

See Also:
Constant Field Values
Method Detail

getRenderObserver

public MultipassRenderObserver getRenderObserver()
Fetch the observer instance that may be associated with the texture source. If no instance is associated, this will return null.

Returns:
The current observer instance, or null if none

getUsedBuffers

public int getUsedBuffers()
Get the list of buffers that are required to be rendered by this source. This will be used by the glClear() call to clear the appropriate buffers. These are the buffers that are to be cleared and used at the start of the multipass rendering. If the application needs to clear buffers during individual passes, that should be performed as part of the MultipassRenderObserver callbacks.

Returns:
A bitwise OR mask of the required buffers

setNumLevels

public void setNumLevels(int numLevels)
                  throws InvalidWriteTimingException,
                         java.lang.IllegalArgumentException
Set the number of levels of mipmap generation that should be rendered. Each level will become a separate rendering pass that will be updated. A check is performed to make sure that the number of levels does not produce a situation where the width or height goes negative in thier values - eg a starting size of 32 pixels square and requesting 6 levels of mipmaps being generated.

Parameters:
numLevels - The number of levels to render
Throws:
java.lang.IllegalArgumentException - The number of levels is more than what the current size could reduce to
InvalidWriteTimingException - An attempt was made to write outside of the NodeUpdateListener callback method

j3d.org Aviatrix3D

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