org.xith3d.render.jsr231
Class TextureUnitStateUnitPeer

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

public class TextureUnitStateUnitPeer
extends java.lang.Object
implements StateUnitPeer


Constructor Summary
TextureUnitStateUnitPeer()
           
 
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 int getMaxAnisotropicLevel(javax.media.opengl.GL gl)
           
static void selectServerTextureUnit(javax.media.opengl.GL gl, int unit, OpenGLStatesCache statesCache, boolean force)
           
protected static int setTextureState2(javax.media.opengl.GL gl, OpenGLCapabilities glCaps, OpenGLStatesCache statesCache, Texture texture, int unit, boolean texChanged, CanvasPeer canvasPeer, int depthBuffersize)
           
static int translateInternalFormat(org.jagatoo.opengl.enums.TextureFormat format, org.jagatoo.opengl.enums.TextureImageInternalFormat internalFormat, int depthBuffersize)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TextureUnitStateUnitPeer

public TextureUnitStateUnitPeer()
Method Detail

getMaxAnisotropicLevel

public static final int getMaxAnisotropicLevel(javax.media.opengl.GL gl)

selectServerTextureUnit

public static final void selectServerTextureUnit(javax.media.opengl.GL gl,
                                                 int unit,
                                                 OpenGLStatesCache statesCache,
                                                 boolean force)

translateInternalFormat

public static final int translateInternalFormat(org.jagatoo.opengl.enums.TextureFormat format,
                                                org.jagatoo.opengl.enums.TextureImageInternalFormat internalFormat,
                                                int depthBuffersize)

setTextureState2

protected static final int setTextureState2(javax.media.opengl.GL gl,
                                            OpenGLCapabilities glCaps,
                                            OpenGLStatesCache statesCache,
                                            Texture texture,
                                            int unit,
                                            boolean texChanged,
                                            CanvasPeer canvasPeer,
                                            int depthBuffersize)

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