org.xith3d.render.jsr231
Class PolygonAttribsStateUnitPeer

java.lang.Object
  extended by org.xith3d.render.jsr231.PolygonAttribsStateUnitPeer
All Implemented Interfaces:
StateUnitPeer

public class PolygonAttribsStateUnitPeer
extends java.lang.Object
implements StateUnitPeer

Handles the setting of polygon attributes.


Constructor Summary
PolygonAttribsStateUnitPeer()
           
 
Method Summary
 void apply(RenderAtom<?> atom, StateUnit stateUnit, java.lang.Object glObj, CanvasPeer canvasPeer, RenderPeer renderPeer, OpenGLCapabilities glCaps, View view, OpenGLStatesCache statesCache, RenderOptions options, long nanoTime, long nanoStep, RenderPeer.RenderMode renderMode, long frameId)
          Takes the StateUnit assigned to the specified atom and sets up the graphics environment, so that it is correct.
static void enablePolygonOffset(javax.media.opengl.GL gl, org.jagatoo.opengl.enums.DrawMode mode, OpenGLStatesCache statesCache, boolean enable)
           
static boolean setCullMode(javax.media.opengl.GL gl, OpenGLStatesCache statesCache, org.jagatoo.opengl.enums.FaceCullMode mode, boolean autoEnable, boolean isPickMode)
           
static void setCullMode(javax.media.opengl.GL gl, OpenGLStatesCache statesCache, int mode, boolean enable, boolean isPickMode)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PolygonAttribsStateUnitPeer

public PolygonAttribsStateUnitPeer()
Method Detail

enablePolygonOffset

public static final void enablePolygonOffset(javax.media.opengl.GL gl,
                                             org.jagatoo.opengl.enums.DrawMode mode,
                                             OpenGLStatesCache statesCache,
                                             boolean enable)

setCullMode

public static final void setCullMode(javax.media.opengl.GL gl,
                                     OpenGLStatesCache statesCache,
                                     int mode,
                                     boolean enable,
                                     boolean isPickMode)

setCullMode

public static final boolean setCullMode(javax.media.opengl.GL gl,
                                        OpenGLStatesCache statesCache,
                                        org.jagatoo.opengl.enums.FaceCullMode mode,
                                        boolean autoEnable,
                                        boolean isPickMode)

apply

public void apply(RenderAtom<?> atom,
                  StateUnit stateUnit,
                  java.lang.Object glObj,
                  CanvasPeer canvasPeer,
                  RenderPeer renderPeer,
                  OpenGLCapabilities glCaps,
                  View view,
                  OpenGLStatesCache statesCache,
                  RenderOptions options,
                  long nanoTime,
                  long nanoStep,
                  RenderPeer.RenderMode renderMode,
                  long frameId)
Description copied from interface: StateUnitPeer
Takes the StateUnit assigned to the specified atom and sets up the graphics environment, so that it is correct. Do so by only updating, where there is a change.

The whole atom is supplied here because there might be some StateUnits, that need to access the geometry in order to work properly.

Specified by:
apply in interface StateUnitPeer