|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.jme.scene.state.RenderState
com.jme.scene.state.TextureState
com.jme.scene.state.lwjgl.LWJGLTextureState
public class LWJGLTextureState
LWJGLTextureState
subclasses the TextureState object using the
LWJGL API to access OpenGL for texture processing.
Nested Class Summary | |
---|---|
protected static class |
LWJGLTextureState.LWJGLMipMap
override MipMap to access helper methods |
Nested classes/interfaces inherited from class com.jme.scene.state.TextureState |
---|
TextureState.CorrectionType |
Nested classes/interfaces inherited from class com.jme.scene.state.RenderState |
---|
RenderState.StateType |
Field Summary |
---|
Fields inherited from class com.jme.scene.state.RenderState |
---|
QUICK_COMPARE, RS_BLEND, RS_CLIP, RS_COLORMASK_STATE, RS_CULL, 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. |
static void |
applyBlendColor(Texture texture,
TextureUnitRecord unitRecord,
int unit,
TextureStateRecord record)
|
static void |
applyBorderColor(Texture texture,
TextureRecord texRecord,
int unit,
TextureStateRecord record)
|
static void |
applyCombineFactors(Texture texture,
TextureUnitRecord unitRecord,
int unit,
TextureStateRecord record)
|
static void |
applyEnvMode(Texture.ApplyMode mode,
TextureUnitRecord unitRecord,
int unit,
TextureStateRecord record)
|
static void |
applyFilter(Texture texture,
TextureRecord texRecord,
int unit,
TextureStateRecord record)
Check if the filter settings of this particular texture have been changed and apply as needed. |
static void |
applyShadow(Texture texture,
TextureRecord texRecord,
int unit,
TextureStateRecord record)
Check if the filter settings of this particular texture have been changed and apply as needed. |
static void |
applyTexCoordGeneration(Texture texture,
TextureUnitRecord unitRecord,
int unit,
TextureStateRecord record)
|
static void |
applyTextureTransforms(Texture texture,
int unit,
TextureStateRecord record)
|
static void |
applyWrap(Texture1D texture,
TextureRecord texRecord,
int unit,
TextureStateRecord record)
Check if the wrap mode of this particular texture has been changed and apply as needed. |
static void |
applyWrap(Texture2D texture,
TextureRecord texRecord,
int unit,
TextureStateRecord record)
Check if the wrap mode of this particular texture has been changed and apply as needed. |
static void |
applyWrap(Texture3D texture,
TextureRecord texRecord,
int unit,
TextureStateRecord record)
Check if the wrap mode of this particular texture has been changed and apply as needed. |
static void |
applyWrap(TextureCubeMap cubeMap,
TextureRecord texRecord,
int unit,
TextureStateRecord record)
Check if the wrap mode of this particular texture has been changed and apply as needed. |
static void |
applyWrap(Texture texture,
TextureRecord texRecord,
int unit,
TextureStateRecord record)
Check if the wrap mode of this particular texture has been changed and apply as needed. |
static void |
checkAndSetUnit(int unit,
TextureStateRecord record)
|
StateRecord |
createStateRecord()
|
void |
delete(int unit)
Removes the texture of the given unit. |
void |
deleteAll()
Removes all Texture set in this TextureState. |
void |
deleteAll(boolean removeFromCache)
Removes all Texture set in this TextureState. |
void |
deleteTextureId(int textureId)
|
static void |
doTextureBind(int textureId,
int unit,
Texture.Type type)
Useful for external lwjgl based classes that need to safely set the current texture. |
RenderState |
extract(java.util.Stack<? extends RenderState> stack,
Spatial spat)
Extracts from the stack the correct renderstate that should apply to the given spatial. |
void |
load(int unit)
Loads the texture for the given unit into the underlying rendering system, generating mip maps if appropriate. |
Methods inherited from class com.jme.scene.state.RenderState |
---|
isEnabled, needsRefresh, setEnabled, setNeedsRefresh, setQuickCompares |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public LWJGLTextureState()
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 |
---|
public final void load(int unit)
TextureState
load
in class TextureState
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.
apply
in class RenderState
RenderState.apply()
public static void applyCombineFactors(Texture texture, TextureUnitRecord unitRecord, int unit, TextureStateRecord record)
public static void applyEnvMode(Texture.ApplyMode mode, TextureUnitRecord unitRecord, int unit, TextureStateRecord record)
public static void applyBlendColor(Texture texture, TextureUnitRecord unitRecord, int unit, TextureStateRecord record)
public static void applyBorderColor(Texture texture, TextureRecord texRecord, int unit, TextureStateRecord record)
public static void applyTextureTransforms(Texture texture, int unit, TextureStateRecord record)
public static void applyTexCoordGeneration(Texture texture, TextureUnitRecord unitRecord, int unit, TextureStateRecord record)
public static void checkAndSetUnit(int unit, TextureStateRecord record)
public static void applyShadow(Texture texture, TextureRecord texRecord, int unit, TextureStateRecord record)
texture
- our texture objecttexRecord
- our record of the last state of the texture in glrecord
- public static void applyFilter(Texture texture, TextureRecord texRecord, int unit, TextureStateRecord record)
texture
- our texture objecttexRecord
- our record of the last state of the texture in glrecord
- public static void applyWrap(Texture3D texture, TextureRecord texRecord, int unit, TextureStateRecord record)
texture
- our texture objecttexRecord
- our record of the last state of the unit in glrecord
- public static void applyWrap(Texture1D texture, TextureRecord texRecord, int unit, TextureStateRecord record)
texture
- our texture objecttexRecord
- our record of the last state of the unit in glrecord
- public static void applyWrap(Texture texture, TextureRecord texRecord, int unit, TextureStateRecord record)
texture
- our texture objecttexRecord
- our record of the last state of the unit in glrecord
- public static void applyWrap(Texture2D texture, TextureRecord texRecord, int unit, TextureStateRecord record)
texture
- our texture objecttexRecord
- our record of the last state of the unit in glrecord
- public static void applyWrap(TextureCubeMap cubeMap, TextureRecord texRecord, int unit, TextureStateRecord record)
cubeMap
- our texture objecttexRecord
- our record of the last state of the unit in glrecord
- public RenderState extract(java.util.Stack<? extends RenderState> stack, Spatial spat)
RenderState
extract
in class RenderState
stack
- The stack to extract render states from.spat
- The spatial to apply the render states too.
public void delete(int unit)
TextureState
delete
in class TextureState
unit
- The unit of the Texture to remove.public void deleteAll()
TextureState
deleteAll
in class TextureState
public void deleteAll(boolean removeFromCache)
TextureState
deleteAll
in class TextureState
public void deleteTextureId(int textureId)
deleteTextureId
in class TextureState
public StateRecord createStateRecord()
createStateRecord
in class RenderState
public static void doTextureBind(int textureId, int unit, Texture.Type type)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |