|
|||||||||||
| 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
TextureState maintains a texture state for a given node and
it's children. The state maintains a single texture object at a time. It is
not within the scope of this class to generate the texture, and is
recommended that TextureManager be used to create the
Texture objects.
TextureManager,
Serialized Form| Field Summary | |
static int |
COMBINE_CLOSEST
Combine texture states starting from the given Spatial and working towards the root. |
static int |
COMBINE_FIRST
Combine texture states starting from the root node and working towards the given Spatial. |
static int |
COMBINE_RECENT_ENABLED
Similar to COMBINE_CLOSEST, but if a disabled state is encountered, it will stop combining at that point. |
protected int |
firstTexture
|
static int |
INHERIT
Inherit mode from parent. |
protected int |
lastTexture
|
protected static float |
maxAnisotropic
|
protected static int |
numTexUnits
The current number of used texture units. |
static int |
OFF
Ignore textures. |
static int |
REPLACE
Do not combine texture states, just use the most recent one. |
protected static boolean |
supportsMultiTexture
True if multitexturing is supported. |
protected static boolean |
supportsS3TCCompression
True if S3TC compression is supported. |
protected Texture[] |
texture
The texture(s). |
| 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 | |
TextureState()
Constructor instantiates a new TextureState object. |
|
| Method Summary | |
abstract void |
delete(int unit)
Removes the texture of the given unit. |
abstract void |
deleteAll()
Removes all Texture set in this TextureState. |
float |
getMaxAnisotropic()
Returns the maximum anisotropic filter. |
int |
getNumberOfUnits()
getNumberOfUnits returns the number of texture units
the computer's graphics card supports. |
Texture |
getTexture()
getTexture gets the texture that is assigned to the
first texture unit. |
Texture |
getTexture(int textureUnit)
getTexture retrieves the texture being used by the
state in a particular texture unit. |
int |
getType()
getType returns this type of render state. |
boolean |
isS3TCAvailable()
Returns if S3TC compression is available for textures. |
protected void |
resetFirstLast()
Updates firstTexture to be the first non-null Texture, and lastTexture to be the last non-null texture. |
void |
setTexture(Texture texture)
setTexture sets a single texture to the first
texture unit. |
void |
setTexture(Texture texture,
int textureUnit)
setTexture sets the texture object to be used by the
state. |
| Methods inherited from class com.jme.scene.state.RenderState |
apply, extract, isEnabled, setEnabled |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final int OFF
public static final int COMBINE_FIRST
public static final int COMBINE_CLOSEST
public static final int COMBINE_RECENT_ENABLED
public static final int INHERIT
public static final int REPLACE
protected transient Texture[] texture
protected static int numTexUnits
protected static float maxAnisotropic
protected static boolean supportsMultiTexture
protected static boolean supportsS3TCCompression
protected transient int firstTexture
protected transient int lastTexture
| Constructor Detail |
public TextureState()
TextureState object.
| Method Detail |
public int getType()
getType returns this type of render state.
(RS_TEXTURE).
getType in class RenderStateRenderState.getType()public void setTexture(Texture texture)
setTexture sets a single texture to the first
texture unit.
texture - the texture to set.public Texture getTexture()
getTexture gets the texture that is assigned to the
first texture unit.
public void setTexture(Texture texture,
int textureUnit)
setTexture sets the texture object to be used by the
state. The texture unit that this texture uses is set, if the
unit is not valid, i.e. less than zero or greater than the
number of texture units supported by the graphics card, it is
ignored.
texture - the texture to be used by the state.textureUnit - the texture unit this texture will fill.public Texture getTexture(int textureUnit)
getTexture retrieves the texture being used by the
state in a particular texture unit.
textureUnit - the texture unit to retrieve the texture from.
public int getNumberOfUnits()
getNumberOfUnits returns the number of texture units
the computer's graphics card supports.
public abstract void delete(int unit)
unit - The unit of the Texture to remove.public abstract void deleteAll()
public float getMaxAnisotropic()
public boolean isS3TCAvailable()
protected void resetFirstLast()
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||