Package com.jme3.texture
Class TextureImage
java.lang.Object
com.jme3.texture.TextureImage
Wraps a texture so that only a single level of the underlying image is bound
 instead of the entire image.
- 
Nested Class SummaryNested ClassesModifier and TypeClassDescriptionstatic enumEnum specifying the shader access hint of the image.
- 
Constructor SummaryConstructorsConstructorDescriptionTextureImage(Texture texture) TextureImage(Texture texture, int level, int layer) TextureImage(Texture texture, int level, int layer, TextureImage.Access access) TextureImage(Texture texture, TextureImage.Access access) 
- 
Method SummaryModifier and TypeMethodDescriptionvoidbindImage(GL4 gl4, TextureUtil texUtil, int unit) Binds this texture image to the texture unit.booleanClears the update flag and returns the update flag's value before it was cleared.Gets the access hint.Gets the format of the image belonging to the underlying texture.getImage()Gets the image belonging to the underlying texture.intGets the native id of the image belonging to the underlying texture.intgetLayer()Gets the layer.intgetLevel()Gets the level.Gets the underlying texture wrapped by this TextureImage.booleanReturns true if all layers of an image will be bound, whenlayeris negative.booleanReturns true if the update flag has been set indicating rebinding is required.voidsetAccess(TextureImage.Access access) Sets the shader access hint with which to bind the image.voidsetLayer(int layer) Sets the image layer to bind.voidsetLevel(int level) Sets the image level to bind.voidsetTexture(Texture texture) Sets the underlying texture wrapped by this TextureImage.voidSets the update flag indicating this texture image needs rebinding.
- 
Constructor Details- 
TextureImage
- 
TextureImage
- 
TextureImage
- 
TextureImage
 
- 
- 
Method Details- 
bindImageBinds this texture image to the texture unit.Calling this is not completely sufficient for totally binding an image to an image unit. Additionally, the image must be bound beforehand using GL.glBindTexture(int, int).- Parameters:
- gl4- GL4 implementation (not null)
- texUtil- utility used to convert JME's image format to the corresponding GL enum (not null)
- unit- texture unit to bind to
 
- 
setUpdateNeededpublic void setUpdateNeeded()Sets the update flag indicating this texture image needs rebinding.
- 
clearUpdateNeededpublic boolean clearUpdateNeeded()Clears the update flag and returns the update flag's value before it was cleared.- Returns:
 
- 
setTextureSets the underlying texture wrapped by this TextureImage.- Parameters:
- texture- wrapped texture (not null)
 
- 
setLevelpublic void setLevel(int level) Sets the image level to bind.The level controls which mipmap level will be bound to the texture unit, where zero corresponds to the base level of the texture. default=0 - Parameters:
- level- level to bind (not negative)
 
- 
setLayerpublic void setLayer(int layer) Sets the image layer to bind.If the underlying texture is a one/two/three demensional array, cube map, cube map array, or two demensional multisample array, then this value specifies which layer of the array to bind. default=-1 - Parameters:
- layer- layer to bind, or negative to bind all layers
 
- 
setAccessSets the shader access hint with which to bind the image.- Parameters:
- access-
 
- 
getTextureGets the underlying texture wrapped by this TextureImage.- Returns:
- underlying texture
 
- 
getImageGets the image belonging to the underlying texture.- Returns:
 
- 
getFormatGets the format of the image belonging to the underlying texture.- Returns:
 
- 
getImageIdpublic int getImageId()Gets the native id of the image belonging to the underlying texture.- Returns:
 
- 
getLevelpublic int getLevel()Gets the level.- Returns:
- See Also:
 
- 
getLayerpublic int getLayer()Gets the layer.- Returns:
- See Also:
 
- 
getAccessGets the access hint.- Returns:
- See Also:
 
- 
isLayeredpublic boolean isLayered()Returns true if all layers of an image will be bound, whenlayeris negative.- Returns:
- See Also:
 
- 
isUpdateNeededpublic boolean isUpdateNeeded()Returns true if the update flag has been set indicating rebinding is required.- Returns:
 
 
-