DigitalSpaces::DIOGRETexture Struct Reference
[Ogre]

#include <OGREInterfaces.h>

Inherits DigitalSpaces::DIObjectBase.


Public Member Functions

void setTextureType (OGRETextureType ttype)
 Sets the type of texture; can only be changed before load().
OGRETextureType getTextureType ()
 Gets the type of texture.
unsigned long getNumMipmaps ()
 Gets the number of mipmaps to be used for this texture.
void setNumMipmaps (unsigned long num)
 Sets the number of mipmaps to be used for this texture.
bool getMipmapsHardwareGenerated ()
 Are mipmaps hardware generated?
float getGamma ()
 Returns the gamma adjustment factor applied to this texture.
void setGamma (float g)
 Sets the gamma adjustment factor applied to this texture.
unsigned int getHeight ()
 Returns the height of the texture.
unsigned int getWidth ()
 Returns the width of the texture.
unsigned int getDepth ()
 Returns the depth of the texture (only applicable for 3D textures).
unsigned int getSrcHeight ()
 Returns the height of the original input texture (may differ due to hardware requirements).
unsigned int getSrcWidth ()
 Returns the width of the original input texture (may differ due to hardware requirements).
unsigned int getSrcDepth ()
 Returns the original depth of the input texture (only applicable for 3D textures).
void setHeight (unsigned int h)
 Set the height of the texture; can only do this before load();.
void setWidth (unsigned int w)
 Set the width of the texture; can only do this before load();.
void setDepth (unsigned int d)
 Set the depth of the texture (only applicable for 3D textures); ; can only do this before load();.
int getUsage ()
 Returns the TextureUsage indentifier for this Texture.
void setUsage (int u)
 Sets the TextureUsage indentifier for this Texture; only useful before load().
void createInternalResources ()
 Creates the internal texture resources for this texture.
void freeInternalResources ()
 Frees internal texture resources for this texture.
void copyToTexture (DIOGRETexture *target)
 Copies (and maybe scales to fit) the contents of this texture to another texture.
void loadRawData (void *stream, unsigned int stream_size, unsigned short uWidth, unsigned short uHeight, OGREPixelFormat eFormat)
 Loads the data from an image.
void setDesiredIntegerBitDepth (unsigned short bits)
OGREPixelFormat getFormat ()
 Returns the pixel format for the texture surface.
void setFormat (OGREPixelFormat pf)
 Sets the pixel format for the texture surface; can only be set before load().
bool hasAlpha ()
 Returns true if the texture has an alpha layer.
unsigned long getNumFaces ()
 Return the number of faces this texture has.
DIOGREHardwarePixelBuffergetBuffer (unsigned long face=0, unsigned long mipmap=0)
 Return hardware pixel buffer for a surface.

Member Function Documentation

void DigitalSpaces::DIOGRETexture::setTextureType ( OGRETextureType  ttype  ) 

Sets the type of texture; can only be changed before load().

OGRETextureType DigitalSpaces::DIOGRETexture::getTextureType (  ) 

Gets the type of texture.

unsigned long DigitalSpaces::DIOGRETexture::getNumMipmaps (  ) 

Gets the number of mipmaps to be used for this texture.

void DigitalSpaces::DIOGRETexture::setNumMipmaps ( unsigned long  num  ) 

Sets the number of mipmaps to be used for this texture.

Note:
Must be set before calling any 'load' method.

bool DigitalSpaces::DIOGRETexture::getMipmapsHardwareGenerated (  ) 

Are mipmaps hardware generated?

Remarks:
Will only be accurate after texture load, or createInternalResources

float DigitalSpaces::DIOGRETexture::getGamma (  ) 

Returns the gamma adjustment factor applied to this texture.

void DigitalSpaces::DIOGRETexture::setGamma ( float  g  ) 

Sets the gamma adjustment factor applied to this texture.

Note:
Must be called before any 'load' method.

unsigned int DigitalSpaces::DIOGRETexture::getHeight (  ) 

Returns the height of the texture.

unsigned int DigitalSpaces::DIOGRETexture::getWidth (  ) 

Returns the width of the texture.

unsigned int DigitalSpaces::DIOGRETexture::getDepth (  ) 

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

unsigned int DigitalSpaces::DIOGRETexture::getSrcHeight (  ) 

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

unsigned int DigitalSpaces::DIOGRETexture::getSrcWidth (  ) 

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

unsigned int DigitalSpaces::DIOGRETexture::getSrcDepth (  ) 

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

void DigitalSpaces::DIOGRETexture::setHeight ( unsigned int  h  ) 

Set the height of the texture; can only do this before load();.

void DigitalSpaces::DIOGRETexture::setWidth ( unsigned int  w  ) 

Set the width of the texture; can only do this before load();.

void DigitalSpaces::DIOGRETexture::setDepth ( unsigned int  d  ) 

Set the depth of the texture (only applicable for 3D textures); ; can only do this before load();.

int DigitalSpaces::DIOGRETexture::getUsage (  ) 

Returns the TextureUsage indentifier for this Texture.

void DigitalSpaces::DIOGRETexture::setUsage ( int  u  ) 

Sets the TextureUsage indentifier for this Texture; only useful before load().

Parameters:
u is a combination of TU_STATIC, TU_DYNAMIC, TU_WRITE_ONLY TU_AUTOMIPMAP and TU_RENDERTARGET (see TextureUsage enum). You are strongly advised to use HBU_STATIC_WRITE_ONLY wherever possible, if you need to update regularly, consider HBU_DYNAMIC_WRITE_ONLY.

void DigitalSpaces::DIOGRETexture::createInternalResources (  ) 

Creates the internal texture resources for this texture.

Remarks:
This method creates the internal texture resources (pixel buffers, texture surfaces etc) required to begin using this texture. You do not need to call this method directly unless you are manually creating a texture, in which case something must call it, after having set the size and format of the texture (e.g. the ManualResourceLoader might be the best one to call it). If you are not defining a manual texture, or if you use one of the self-contained load...() methods, then it will be called for you.

void DigitalSpaces::DIOGRETexture::freeInternalResources (  ) 

Frees internal texture resources for this texture.

void DigitalSpaces::DIOGRETexture::copyToTexture ( DIOGRETexture target  ) 

Copies (and maybe scales to fit) the contents of this texture to another texture.

void DigitalSpaces::DIOGRETexture::loadRawData ( void *  stream,
unsigned int  stream_size,
unsigned short  uWidth,
unsigned short  uHeight,
OGREPixelFormat  eFormat 
)

Loads the data from an image.

Loads the data from a raw stream.

void DigitalSpaces::DIOGRETexture::setDesiredIntegerBitDepth ( unsigned short  bits  ) 

OGREPixelFormat DigitalSpaces::DIOGRETexture::getFormat (  ) 

Returns the pixel format for the texture surface.

void DigitalSpaces::DIOGRETexture::setFormat ( OGREPixelFormat  pf  ) 

Sets the pixel format for the texture surface; can only be set before load().

bool DigitalSpaces::DIOGRETexture::hasAlpha (  ) 

Returns true if the texture has an alpha layer.

unsigned long DigitalSpaces::DIOGRETexture::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.

DIOGREHardwarePixelBuffer* DigitalSpaces::DIOGRETexture::getBuffer ( unsigned long  face = 0,
unsigned long  mipmap = 0 
)

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.

Parameters:
face Face number, in case of a cubemap texture. Must be 0 for other types of textures.
mipmap Mipmap level. This goes from 0 for the first, largest mipmap level to getNumMipmaps()-1 for the smallest.
Returns:
A shared pointer to a hardware pixel buffer
Remarks:
The buffer is invalidated when the resource is unloaded or destroyed. Do not use it after the lifetime of the containing texture.


The documentation for this struct was generated from the following file:

Generated on Sun Aug 31 17:46:32 2008 for Digital Spaces by  doxygen 1.5.6