org.xith3d.render
Class StateUnitPeerRegistry
java.lang.Object
org.xith3d.render.StateUnitPeerRegistry
public abstract class StateUnitPeerRegistry
- extends java.lang.Object
A ShaderRegistry maintains all ShaderPeer implementations used by the
rendering implementation.
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
peerMap
protected final StateUnitPeer[] peerMap
atomMap
protected final RenderAtomPeer[] atomMap
StateUnitPeerRegistry
public StateUnitPeerRegistry()
registerStateUnitPeer
protected void registerStateUnitPeer(int stateUnitType,
StateUnitPeer stateUnitPeer)
- Registers an API specific rendering peer. An appearance shader could be
implemented differently in LWJGL and JOGL.
- Parameters:
stateUnitType - stateUnitPeer -
registerAtomRenderer
protected void registerAtomRenderer(int atomType,
RenderAtomPeer atomPeer)
- The RenderAtomPeer implements the API specific commands necessary to
render the geometry. For example a GeometryArray.
- Parameters:
atomType - atomPeer -
getStateUnitPeer
public final StateUnitPeer getStateUnitPeer(int stateUnitType)
- Parameters:
stateUnitType -
- Returns:
- the StateUnitPeer for this StateUnit. The first time we hit a stateType
we have not seen yet this will need to lookup the class and
assign it to the state type. Subsequent times it is a quick
lookup.
getRenderAtomPeer
public final RenderAtomPeer getRenderAtomPeer(int atomStateType)
- Parameters:
atomStateType -
- Returns:
- the RenderAtomPeer for this atom. The first time we hit a
stateType we have not seen yet this will need to lookup the class
and assign it to the state type. Subsequent times it is a quick
lookup.