Aviatrix3D
2.1.0

org.j3d.aviatrix3d.rendering
Interface BufferStateRenderable

All Superinterfaces:
java.lang.Comparable, Renderable
All Known Implementing Classes:
AccumulationBufferState, ColorBufferState, DepthBufferState, GeneralBufferState, StencilBufferState

public interface BufferStateRenderable
extends Renderable

Marker describing a renderable object that is used to control one of the OpenGL buffer states.

The buffer state renderables are only used at the beginning of a rendering pass as part of a Scene object. Buffer state renderables may be issued once at the beginning of a drawing run and then never again. In multipass rendering where you may want to accumulate state over multiple runs, one instance may start the state, then several are used to change the state between runs, and finally it is cleared at the end of the last run.

Version:
$Revision: 2.2 $
Author:
Justin Couch

Field Summary
static int ACCUMULATION_BUFFER
          The buffer state represents Accumulation buffers
static int COLOR_BUFFER
          The buffer state represents colour buffers
static int DEPTH_BUFFER
          The buffer state represents depth buffers
static int GENERAL_BUFFER
          The buffer state represents general buffer management
static int STENCIL_BUFFER
          The buffer state represents stencil buffers
 
Method Summary
 boolean checkClearBufferState()
          Check to see if this buffer should be cleared at the start of this run.
 void clearBufferState(javax.media.opengl.GL gl)
          Restore all state to the default values.
 int getBufferBitMask()
          Get the GL buffer bit flag that this state class represents.
 int getBufferType()
          Get the type of buffer this state represents.
 void setBufferState(javax.media.opengl.GL gl)
          Issue ogl commands needed for this buffer to set the initial state, including the initial enabling.
 void updateBufferState(javax.media.opengl.GL gl)
          Issue ogl commands needed for this component to change the state, assuming that it is already enabled.
 
Methods inherited from interface org.j3d.aviatrix3d.rendering.Renderable
equals
 
Methods inherited from interface java.lang.Comparable
compareTo
 

Field Detail

ACCUMULATION_BUFFER

static final int ACCUMULATION_BUFFER
The buffer state represents Accumulation buffers

See Also:
Constant Field Values

STENCIL_BUFFER

static final int STENCIL_BUFFER
The buffer state represents stencil buffers

See Also:
Constant Field Values

DEPTH_BUFFER

static final int DEPTH_BUFFER
The buffer state represents depth buffers

See Also:
Constant Field Values

COLOR_BUFFER

static final int COLOR_BUFFER
The buffer state represents colour buffers

See Also:
Constant Field Values

GENERAL_BUFFER

static final int GENERAL_BUFFER
The buffer state represents general buffer management

See Also:
Constant Field Values
Method Detail

getBufferType

int getBufferType()
Get the type of buffer this state represents.

Returns:
One of the _BUFFER constants

getBufferBitMask

int getBufferBitMask()
Get the GL buffer bit flag that this state class represents. Used for bulk clearing all the states at once.

Returns:
The bit state constant for Stencil Buffers

checkClearBufferState

boolean checkClearBufferState()
Check to see if this buffer should be cleared at the start of this run. If it should be, add the bit mask from this state to the global list.

Returns:
true if the state should be cleared

setBufferState

void setBufferState(javax.media.opengl.GL gl)
Issue ogl commands needed for this buffer to set the initial state, including the initial enabling.

Parameters:
gl - The gl context to draw with

updateBufferState

void updateBufferState(javax.media.opengl.GL gl)
Issue ogl commands needed for this component to change the state, assuming that it is already enabled.

Parameters:
gl - The gl context to draw with

clearBufferState

void clearBufferState(javax.media.opengl.GL gl)
Restore all state to the default values.

Parameters:
gl - The gl context to draw with

Aviatrix3D
2.1.0

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