Package com.ardor3d.scene.state.jogl
Class JoglTextureStateUtil
java.lang.Object
com.ardor3d.scene.state.jogl.JoglTextureStateUtil
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
apply
(JoglRenderer renderer, TextureState state) static void
applyBlendColor
(Texture texture, TextureUnitRecord unitRecord, int unit, TextureStateRecord record, ContextCapabilities caps) static void
applyBorderColor
(Texture texture, TextureRecord texRecord, int unit, TextureStateRecord record, ContextCapabilities caps) static void
applyCombineFactors
(Texture texture, TextureUnitRecord unitRecord, int unit, TextureStateRecord record, ContextCapabilities caps) static void
applyEnvMode
(Texture.ApplyMode mode, TextureUnitRecord unitRecord, int unit, TextureStateRecord record, ContextCapabilities caps) static void
applyFilter
(Texture texture, TextureRecord texRecord, int unit, TextureStateRecord record, ContextCapabilities caps) Check if the filter settings of this particular texture have been changed and apply as needed.static void
applyLodBias
(Texture texture, TextureUnitRecord unitRecord, int unit, TextureStateRecord record, ContextCapabilities caps) static void
applyShadow
(Texture texture, TextureRecord texRecord, int unit, TextureStateRecord record, ContextCapabilities caps) 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, ContextCapabilities caps) static void
applyTextureTransforms
(Texture texture, int unit, TextureStateRecord record, ContextCapabilities caps) static void
applyWrap
(Texture1D texture, TextureRecord texRecord, int unit, TextureStateRecord record, ContextCapabilities caps) 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, ContextCapabilities caps) 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, ContextCapabilities caps) 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, ContextCapabilities caps) 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, ContextCapabilities caps) Check if the wrap mode of this particular texture has been changed and apply as needed.static void
checkAndSetUnit
(int unit, TextureStateRecord record, ContextCapabilities caps) static void
deleteTexture
(Texture texture) static void
static void
doTextureBind
(Texture texture, int unit, boolean invalidateState) Useful for external jogl based classes that need to safely set the current texture.static int
static int
getGLType
(Texture.Type type) static final void
static void
bind texture and upload image data to card
-
Constructor Details
-
JoglTextureStateUtil
public JoglTextureStateUtil()
-
-
Method Details
-
load
-
update
bind texture and upload image data to card- Parameters:
texture
- the textureunit
- the texture unit
-
apply
-
applyCombineFactors
public static void applyCombineFactors(Texture texture, TextureUnitRecord unitRecord, int unit, TextureStateRecord record, ContextCapabilities caps) -
applyEnvMode
public static void applyEnvMode(Texture.ApplyMode mode, TextureUnitRecord unitRecord, int unit, TextureStateRecord record, ContextCapabilities caps) -
applyBlendColor
public static void applyBlendColor(Texture texture, TextureUnitRecord unitRecord, int unit, TextureStateRecord record, ContextCapabilities caps) -
applyLodBias
public static void applyLodBias(Texture texture, TextureUnitRecord unitRecord, int unit, TextureStateRecord record, ContextCapabilities caps) -
applyBorderColor
public static void applyBorderColor(Texture texture, TextureRecord texRecord, int unit, TextureStateRecord record, ContextCapabilities caps) -
applyTextureTransforms
public static void applyTextureTransforms(Texture texture, int unit, TextureStateRecord record, ContextCapabilities caps) -
applyTexCoordGeneration
public static void applyTexCoordGeneration(Texture texture, TextureUnitRecord unitRecord, int unit, TextureStateRecord record, ContextCapabilities caps) -
checkAndSetUnit
-
applyShadow
public static void applyShadow(Texture texture, TextureRecord texRecord, int unit, TextureStateRecord record, ContextCapabilities caps) Check if the filter settings of this particular texture have been changed and apply as needed.- Parameters:
texture
- our texture objecttexRecord
- our record of the last state of the texture in glunit
- the texture unitrecord
- the texture state recordcaps
- the capabilities
-
applyFilter
public static void applyFilter(Texture texture, TextureRecord texRecord, int unit, TextureStateRecord record, ContextCapabilities caps) Check if the filter settings of this particular texture have been changed and apply as needed.- Parameters:
texture
- our texture objecttexRecord
- our record of the last state of the texture in glunit
- the texture unitrecord
- the texture state recordcaps
- the capabilities
-
applyWrap
public static void applyWrap(Texture3D texture, TextureRecord texRecord, int unit, TextureStateRecord record, ContextCapabilities caps) Check if the wrap mode of this particular texture has been changed and apply as needed.- Parameters:
texture
- our texture objecttexRecord
- our record of the last state of the texture in glunit
- the texture unitrecord
- the texture state recordcaps
- the capabilities
-
applyWrap
public static void applyWrap(Texture1D texture, TextureRecord texRecord, int unit, TextureStateRecord record, ContextCapabilities caps) Check if the wrap mode of this particular texture has been changed and apply as needed.- Parameters:
texture
- our texture objecttexRecord
- our record of the last state of the texture in glunit
- the texture unitrecord
- the texture state recordcaps
- the capabilities
-
applyWrap
public static void applyWrap(Texture texture, TextureRecord texRecord, int unit, TextureStateRecord record, ContextCapabilities caps) Check if the wrap mode of this particular texture has been changed and apply as needed.- Parameters:
texture
- our texture objecttexRecord
- our record of the last state of the texture in glunit
- the texture unitrecord
- the texture state recordcaps
- the capabilities
-
applyWrap
public static void applyWrap(Texture2D texture, TextureRecord texRecord, int unit, TextureStateRecord record, ContextCapabilities caps) Check if the wrap mode of this particular texture has been changed and apply as needed.- Parameters:
texture
- our texture objecttexRecord
- our record of the last state of the texture in glunit
- the texture unitrecord
- the texture state recordcaps
- the capabilities
-
applyWrap
public static void applyWrap(TextureCubeMap cubeMap, TextureRecord texRecord, int unit, TextureStateRecord record, ContextCapabilities caps) Check if the wrap mode of this particular texture has been changed and apply as needed.- Parameters:
cubeMap
- our texture objecttexRecord
- our record of the last state of the unit in glunit
- the texture unitrecord
- the texture state recordcaps
- the capabilities
-
deleteTexture
-
deleteTextureIds
-
doTextureBind
Useful for external jogl based classes that need to safely set the current texture.- Parameters:
texture
- the textureunit
- the texture unitinvalidateState
-true
if the state has to be invalidated
-
getGLType
-
getGLCubeMapFace
-