crystalspace.jbind.interfaces.ivideo.texture
Interface iTextureHandle

All Superinterfaces:
iBase, iPointer
All Known Implementing Classes:
csTextureHandle

public interface iTextureHandle
extends iBase

A texture handle as returned by iTextureManager.

Author:
Java wrapper - Quentin Anciaux, c++ version - http://crystal.sourceforge.net/docs/online/pubapi/structiTextureHandle.php

Field Summary
static int CS_TEX_IMG_1D
           
static int CS_TEX_IMG_2D
           
static int CS_TEX_IMG_3D
           
static int CS_TEX_IMG_CUBEMAP
           
static int CS_TEXTURE_CUBE_NEG_X
           
static int CS_TEXTURE_CUBE_NEG_Y
           
static int CS_TEXTURE_CUBE_NEG_Z
           
static int CS_TEXTURE_CUBE_POS_X
           
static int CS_TEXTURE_CUBE_POS_Y
           
static int CS_TEXTURE_CUBE_POS_Z
           
 
Method Summary
 boolean getAlphaMap()
          Query if the texture has an alpha channel.
 iPointer getCacheData()
          Get data associated internally with this texture by texture cache.
 iGraphics2D getCanvas()
          Get a canvas instance which is suitable for rendering on this texture.
 int getFlags()
          Retrieve the flags set for this texture.
 byte[] getKeyColor()
          Get the key color.
 boolean getKeyColorStatus()
          Get the key color status (false if disabled, true if enabled);.
 byte[] getMeanColor()
          Get the mean color.
 int[] getMipMapDimensions()
          Get the dimensions for a given mipmap level (0 to 3);.
 int[] getOriginalDimensions()
          Return the original dimensions of the image used to create this texture.
 void prepare()
          Merge this texture into current palette, compute mipmaps and so on.
 void setCacheData(iPointer d)
          Set data associated internally with this texture by texture cache.
 void setKeyColor(byte red, byte green, byte blue)
          Set the key color.
 void setKeyColorStatus(boolean Enable)
          Enable key color.
 
Methods inherited from interface crystalspace.jbind.interfaces.iutil.scf.iBase
decRef, getName, getRefCount, getVersion, incRef, queryInterface, queryInterfaceSafe
 
Methods inherited from interface crystalspace.jbind.interfaces.iPointer
changePointer, getPointer, isMemoryOwner, setMemoryOwner
 

Field Detail

CS_TEX_IMG_1D

public static final int CS_TEX_IMG_1D
See Also:
Constant Field Values

CS_TEX_IMG_2D

public static final int CS_TEX_IMG_2D
See Also:
Constant Field Values

CS_TEX_IMG_3D

public static final int CS_TEX_IMG_3D
See Also:
Constant Field Values

CS_TEX_IMG_CUBEMAP

public static final int CS_TEX_IMG_CUBEMAP
See Also:
Constant Field Values

CS_TEXTURE_CUBE_POS_X

public static final int CS_TEXTURE_CUBE_POS_X
See Also:
Constant Field Values

CS_TEXTURE_CUBE_NEG_X

public static final int CS_TEXTURE_CUBE_NEG_X
See Also:
Constant Field Values

CS_TEXTURE_CUBE_POS_Y

public static final int CS_TEXTURE_CUBE_POS_Y
See Also:
Constant Field Values

CS_TEXTURE_CUBE_NEG_Y

public static final int CS_TEXTURE_CUBE_NEG_Y
See Also:
Constant Field Values

CS_TEXTURE_CUBE_POS_Z

public static final int CS_TEXTURE_CUBE_POS_Z
See Also:
Constant Field Values

CS_TEXTURE_CUBE_NEG_Z

public static final int CS_TEXTURE_CUBE_NEG_Z
See Also:
Constant Field Values
Method Detail

getAlphaMap

public boolean getAlphaMap()
Query if the texture has an alpha channel. This depends both on whenever the original image had an alpha channel and of the fact whenever the renderer supports alpha maps at all.

Returns:

getCacheData

public iPointer getCacheData()
Get data associated internally with this texture by texture cache.

Returns:

getCanvas

public iGraphics2D getCanvas()
Get a canvas instance which is suitable for rendering on this texture. Note that it is not allowed to change the palette of the returned canvas.

Returns:

getFlags

public int getFlags()
Retrieve the flags set for this texture.

Returns:

getKeyColor

public byte[] getKeyColor()
Get the key color.

Returns:

getKeyColorStatus

public boolean getKeyColorStatus()
Get the key color status (false if disabled, true if enabled);.

Returns:

getMeanColor

public byte[] getMeanColor()
Get the mean color.

Returns:

getMipMapDimensions

public int[] getMipMapDimensions()
Get the dimensions for a given mipmap level (0 to 3);. If the texture was registered just for 2D usage, mipmap levels above 0 will return false. Note that the result of this function will be the size that the renderer uses for this texture. In most cases this corresponds to the size that was used to create this texture but some renderers have texture size limitations (like power of two); and in that case the size returned here will be the corrected size. You can get the original image size with GetOriginalDimensions();.

Returns:

getOriginalDimensions

public int[] getOriginalDimensions()
Return the original dimensions of the image used to create this texture. This is most often equal to GetMipMapDimensions (0, mw, mh); but in some cases the texture will have been resized in order to accomodate hardware restrictions (like power of two and maximum texture size);. This function returns the uncorrected coordinates.

Returns:

prepare

public void prepare()
Merge this texture into current palette, compute mipmaps and so on. You should call either Prepare(); or iTextureManager::PrepareTextures(); before using any texture. Note that it is in this stage that the original image that is attached to a texture is scaled so that it fits hardware requirements. So it is important to realize that calling this function may actually change the image from which you created this texture!


setCacheData

public void setCacheData(iPointer d)
Set data associated internally with this texture by texture cache.

Parameters:
d -

setKeyColor

public void setKeyColor(byte red,
                        byte green,
                        byte blue)
Set the key color.

Parameters:
red -
green -
blue -

setKeyColorStatus

public void setKeyColorStatus(boolean Enable)
Enable key color.

Parameters:
Enable -