com.jme.scene.state.lwjgl
Class LWJGLTextureState

java.lang.Object
  extended bycom.jme.scene.state.RenderState
      extended bycom.jme.scene.state.TextureState
          extended bycom.jme.scene.state.lwjgl.LWJGLTextureState
All Implemented Interfaces:
java.io.Serializable

public class LWJGLTextureState
extends TextureState

LWJGLTextureState subclasses the TextureState object using the LWJGL API to access OpenGL for texture processing.

Version:
$Id: LWJGLTextureState.java,v 1.37 2005/04/04 19:10:55 renanse Exp $
Author:
Mark Powell
See Also:
Serialized Form

Field Summary
 
Fields inherited from class com.jme.scene.state.TextureState
COMBINE_CLOSEST, COMBINE_FIRST, COMBINE_RECENT_ENABLED, firstTexture, INHERIT, lastTexture, maxAnisotropic, numTexUnits, OFF, REPLACE, supportsMultiTexture, supportsS3TCCompression, texture
 
Fields inherited from class com.jme.scene.state.RenderState
RS_ALPHA, RS_ATTRIBUTE, RS_CULL, RS_DITHER, RS_FOG, RS_FRAGMENT_PROGRAM, RS_GLSL_SHADER_OBJECTS, RS_LIGHT, RS_MATERIAL, RS_MAX_STATE, RS_SHADE, RS_STENCIL, RS_TEXTURE, RS_VERTEX_PROGRAM, RS_WIREFRAME, RS_ZBUFFER
 
Constructor Summary
LWJGLTextureState()
          Constructor instantiates a new LWJGLTextureState object.
 
Method Summary
 void apply()
          apply manages the textures being described by the state.
 void delete(int unit)
          Removes the texture of the given unit.
 void deleteAll()
          Removes all Texture set in this TextureState.
 RenderState extract(java.util.Stack stack, Spatial spat)
          Extracts from the stack the correct renderstate that should apply to the given spatial.
 
Methods inherited from class com.jme.scene.state.TextureState
getMaxAnisotropic, getNumberOfUnits, getTexture, getTexture, getType, isS3TCAvailable, resetFirstLast, setTexture, setTexture
 
Methods inherited from class com.jme.scene.state.RenderState
isEnabled, setEnabled
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

LWJGLTextureState

public LWJGLTextureState()
Constructor instantiates a new LWJGLTextureState object. The number of textures that can be combined is determined during construction. This equates the number of texture units supported by the graphics card.

Method Detail

apply

public void apply()
apply manages the textures being described by the state. If the texture has not been loaded yet, it is generated and loaded using OpenGL11. This means the initial pass to set will be longer than subsequent calls. The multitexture extension is used to define the multiple texture states, with the number of units being determined at construction time.

Specified by:
apply in class RenderState
See Also:
RenderState.apply()

extract

public RenderState extract(java.util.Stack stack,
                           Spatial spat)
Description copied from class: RenderState
Extracts from the stack the correct renderstate that should apply to the given spatial. This is mainly used for RenderStates that can be cumulitive such as TextureState or LightState. By default, the top of the static is returned. This function should not be called by users directly.

Overrides:
extract in class RenderState
Parameters:
stack - The stack to extract render states from.
spat - The spatial to apply the render states too.
Returns:
The render state to use.

delete

public void delete(int unit)
Description copied from class: TextureState
Removes the texture of the given unit.

Specified by:
delete in class TextureState
Parameters:
unit - The unit of the Texture to remove.

deleteAll

public void deleteAll()
Description copied from class: TextureState
Removes all Texture set in this TextureState.

Specified by:
deleteAll in class TextureState