org.ogre4j
Interface ITexture

All Superinterfaces:
IAllocatedObject<IResourceAllocPolicy>, INativeObject, IResource, IResourceAllocatedObject, IStringInterface
All Known Implementing Classes:
Texture

public interface ITexture
extends INativeObject, IResource


Nested Class Summary
 
Nested classes/interfaces inherited from interface org.ogre4j.IResource
IResource.IListener, IResource.IListenerList
 
Method Summary
 void _loadImages(IConstImagePtrList images)
          Internal method to load the texture from a set of images.
 void copyToTexture(ITexturePtr target)
          Copies (and maybe scales to fit) the contents of this texture to another texture.
 void createInternalResources()
          Creates the internal texture resources for this texture.
 void freeInternalResources()
          Frees internal texture resources for this texture.
 void getBuffer(IHardwarePixelBufferSharedPtr returnValue, int face, int mipmap)
          Return hardware pixel buffer for a surface.
 int getDepth()
          Returns the depth of the texture (only applicable for 3D textures).
 int getDesiredFloatBitDepth()
          gets desired bit depth for float pixel format textures.
 PixelFormat getDesiredFormat()
          Returns the desired pixel format for the texture surface.
 int getDesiredIntegerBitDepth()
          gets desired bit depth for integer pixel format textures.
 PixelFormat getFormat()
          Returns the pixel format for the texture surface.
 long getFSAA()
          Get the level of multisample AA to be used if this texture is a rendertarget.
 float getGamma()
          Returns the gamma adjustment factor applied to this texture on loading.
 int getHeight()
          Returns the height of the texture.
 boolean getMipmapsHardwareGenerated()
          Are mipmaps hardware generated?
 int getNumFaces()
          Return the number of faces this texture has.
 int getNumMipmaps()
          Gets the number of mipmaps to be used for this texture.
 int getSrcDepth()
          Returns the original depth of the input texture (only applicable for 3D textures).
 PixelFormat getSrcFormat()
          Returns the pixel format of the original input texture (may differ due to hardware requirements and pixel format convertion).
 int getSrcHeight()
          Returns the height of the original input texture (may differ due to hardware requirements).
 int getSrcWidth()
          Returns the width of the original input texture (may differ due to hardware requirements).
 TextureType getTextureType()
          Gets the type of texture
 boolean getTreatLuminanceAsAlpha()
          Gets whether luminace pixel format will treated as alpha format when load this texture.
 int getUsage()
          Returns the TextureUsage indentifier for this
 int getWidth()
          Returns the width of the texture.
 boolean hasAlpha()
          Returns true if the texture has an alpha layer.
 boolean isHardwareGammaEnabled()
          Gets whether this texture will be set up so that on sampling it, hardware gamma correction is applied.
 void loadImage(IImage img)
          Loads the data from an image.
 void loadRawData(IDataStreamPtr stream, int uWidth, int uHeight, PixelFormat eFormat)
          Loads the data from a raw stream.
 void setDepth(int d)
          Set the depth of the texture (only applicable for 3D textures); ; can only do this before ;
 void setDesiredBitDepths(int integerBits, int floatBits)
          Sets desired bit depth for integer and float pixel format.
 void setDesiredFloatBitDepth(int bits)
          Sets desired bit depth for float pixel format textures.
 void setDesiredIntegerBitDepth(int bits)
          Sets desired bit depth for integer pixel format textures.
 void setFormat(PixelFormat pf)
          Sets the pixel format for the texture surface; can only be set before .
 void setFSAA(long fsaa)
          Set the level of multisample AA to be used if this texture is a rendertarget.
 void setGamma(float g)
          Sets the gamma adjustment factor applied to this texture on loading the data.
 void setHardwareGammaEnabled(boolean enabled)
          Sets whether this texture will be set up so that on sampling it, hardware gamma correction is applied.
 void setHeight(int h)
          Set the height of the texture; can only do this before ;
 void setNumMipmaps(int num)
          Sets the number of mipmaps to be used for this texture.
 void setTextureType(TextureType ttype)
          Sets the type of texture; can only be changed before
 void setTreatLuminanceAsAlpha(boolean asAlpha)
          Sets whether luminace pixel format will treated as alpha format when load this texture.
 void setUsage(int u)
          Sets the TextureUsage indentifier for this ; only useful before
 void setWidth(int w)
          Set the width of the texture; can only do this before ;
 
Methods inherited from interface org.ogre4j.IResource
_dirtyState, _fireBackgroundLoadingComplete, _fireBackgroundPreparingComplete, _notifyOrigin, addListener, changeGroupOwnership, escalateLoading, getCreator, getGroup, getHandle, getLoadingState, getName, getOrigin, getSize, getStateCount, isBackgroundLoaded, isLoaded, isLoading, isManuallyLoaded, isPrepared, isReloadable, load, prepare, reload, removeListener, setBackgroundLoaded, touch, unload
 
Methods inherited from interface org.ogre4j.IStringInterface
copyParametersTo, getParamDictionary_const, getParamDictionary, getParameter, getParameters, setParameter, setParameterList
 
Methods inherited from interface org.xbig.base.INativeObject
delete, disconnectFromNativeObject, getInstancePointer, setInstancePointer, setInstancePointer, setInstancePointer
 

Method Detail

setTextureType

void setTextureType(TextureType ttype)
Sets the type of texture; can only be changed before


getTextureType

TextureType getTextureType()
Gets the type of texture


getNumMipmaps

int getNumMipmaps()
Gets the number of mipmaps to be used for this texture.


setNumMipmaps

void setNumMipmaps(int num)
Sets the number of mipmaps to be used for this texture.


getMipmapsHardwareGenerated

boolean getMipmapsHardwareGenerated()
Are mipmaps hardware generated?


getGamma

float getGamma()
Returns the gamma adjustment factor applied to this texture on loading.


setGamma

void setGamma(float g)
Sets the gamma adjustment factor applied to this texture on loading the data.


setHardwareGammaEnabled

void setHardwareGammaEnabled(boolean enabled)
Sets whether this texture will be set up so that on sampling it, hardware gamma correction is applied.


isHardwareGammaEnabled

boolean isHardwareGammaEnabled()
Gets whether this texture will be set up so that on sampling it, hardware gamma correction is applied.


setFSAA

void setFSAA(long fsaa)
Set the level of multisample AA to be used if this texture is a rendertarget.


getFSAA

long getFSAA()
Get the level of multisample AA to be used if this texture is a rendertarget.


getHeight

int getHeight()
Returns the height of the texture.


getWidth

int getWidth()
Returns the width of the texture.


getDepth

int getDepth()
Returns the depth of the texture (only applicable for 3D textures).


getSrcHeight

int getSrcHeight()
Returns the height of the original input texture (may differ due to hardware requirements).


getSrcWidth

int getSrcWidth()
Returns the width of the original input texture (may differ due to hardware requirements).


getSrcDepth

int getSrcDepth()
Returns the original depth of the input texture (only applicable for 3D textures).


setHeight

void setHeight(int h)
Set the height of the texture; can only do this before ;


setWidth

void setWidth(int w)
Set the width of the texture; can only do this before ;


setDepth

void setDepth(int d)
Set the depth of the texture (only applicable for 3D textures); ; can only do this before ;


getUsage

int getUsage()
Returns the TextureUsage indentifier for this


setUsage

void setUsage(int u)
Sets the TextureUsage indentifier for this ; only useful before


createInternalResources

void createInternalResources()
Creates the internal texture resources for this texture.


freeInternalResources

void freeInternalResources()
Frees internal texture resources for this texture.


copyToTexture

void copyToTexture(ITexturePtr target)
Copies (and maybe scales to fit) the contents of this texture to another texture.


loadImage

void loadImage(IImage img)
Loads the data from an image.


loadRawData

void loadRawData(IDataStreamPtr stream,
                 int uWidth,
                 int uHeight,
                 PixelFormat eFormat)
Loads the data from a raw stream.


_loadImages

void _loadImages(IConstImagePtrList images)
Internal method to load the texture from a set of images.


getFormat

PixelFormat getFormat()
Returns the pixel format for the texture surface.


getDesiredFormat

PixelFormat getDesiredFormat()
Returns the desired pixel format for the texture surface.


getSrcFormat

PixelFormat getSrcFormat()
Returns the pixel format of the original input texture (may differ due to hardware requirements and pixel format convertion).


setFormat

void setFormat(PixelFormat pf)
Sets the pixel format for the texture surface; can only be set before .


hasAlpha

boolean hasAlpha()
Returns true if the texture has an alpha layer.


setDesiredIntegerBitDepth

void setDesiredIntegerBitDepth(int bits)
Sets desired bit depth for integer pixel format textures.


getDesiredIntegerBitDepth

int getDesiredIntegerBitDepth()
gets desired bit depth for integer pixel format textures.


setDesiredFloatBitDepth

void setDesiredFloatBitDepth(int bits)
Sets desired bit depth for float pixel format textures.


getDesiredFloatBitDepth

int getDesiredFloatBitDepth()
gets desired bit depth for float pixel format textures.


setDesiredBitDepths

void setDesiredBitDepths(int integerBits,
                         int floatBits)
Sets desired bit depth for integer and float pixel format.


setTreatLuminanceAsAlpha

void setTreatLuminanceAsAlpha(boolean asAlpha)
Sets whether luminace pixel format will treated as alpha format when load this texture.


getTreatLuminanceAsAlpha

boolean getTreatLuminanceAsAlpha()
Gets whether luminace pixel format will treated as alpha format when load this texture.


getNumFaces

int getNumFaces()
Return the number of faces this texture has. This will be 6 for a cubemap texture and 1 for a 1D, 2D or 3D one.


getBuffer

void getBuffer(IHardwarePixelBufferSharedPtr returnValue,
               int face,
               int mipmap)
Return hardware pixel buffer for a surface. This buffer can then be used to copy data from and to a particular level of the texture.



Copyright © 2007 netAllied GmbH. All Rights Reserved.