org.xith3d.render.states
Class StateUnit
java.lang.Object
org.xith3d.render.states.StateSortable
org.xith3d.render.states.StateUnit
- Direct Known Subclasses:
- ColoringStateUnit, FogStateUnit, LightingStateUnit, LineAttribsStateUnit, MaterialStateUnit, PointAttribsStateUnit, PolygonAttribsStateUnit, RenderingAttribsStateUnit, ShaderProgramStateUnit, TextureUnitStateUnit
public abstract class StateUnit
- extends StateSortable
A shader is what is responsible for setting up the graphics state to render
an atom. StateUnits can be compared to other StateUnits in order to sort them
in an efficient manner.
Each StateUnit needs to have an API peer which is capable of issuing the proper
commands to the 3d card. Thus the StateUnit really is a container for the
information needed to set OpenGL states, but the implementation of the
StateUnit is within the hardware interface layer.
|
Constructor Summary |
StateUnit(int stateType,
boolean isDefault)
|
|
Method Summary |
abstract NodeComponent |
getNodeComponent()
|
boolean |
isDefault()
|
abstract boolean |
isTranslucent()
Because the rendering engine needs to deal with translucent geometry
differently the shader needs to be able to indicate whether it is
translucent or not. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
MAX_STATE_TYPES
public static final int MAX_STATE_TYPES
- See Also:
- Constant Field Values
MAX_ATOM_TYPES
public static final int MAX_ATOM_TYPES
- See Also:
- Constant Field Values
StateUnit
public StateUnit(int stateType,
boolean isDefault)
getNodeComponent
public abstract NodeComponent getNodeComponent()
isDefault
public final boolean isDefault()
isTranslucent
public abstract boolean isTranslucent()
- Because the rendering engine needs to deal with translucent geometry
differently the shader needs to be able to indicate whether it is
translucent or not.
- Returns:
- true, if the Shader is translucent