Aviatrix3D
2.0 Dev

org.j3d.aviatrix3d
Interface RenderableBufferState

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

public interface RenderableBufferState
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.1 $
Author:
Justin Couch

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.
 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.Renderable
equals
 
Methods inherited from interface java.lang.Comparable
compareTo
 

Method Detail

getBufferBitMask

public 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

public 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

public 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

public 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

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

Parameters:
gl - The gl context to draw with

Aviatrix3D
2.0 Dev

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