All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Pages
Public Member Functions | Protected Attributes | List of all members
pvrtexture::CPVRTextureHeader Class Reference

Wrapper class for PVRTextureHeaderV3, adds 'smart' accessor functions. More...

#include <PVRTextureHeader.h>

Inheritance diagram for pvrtexture::CPVRTextureHeader:
Inheritance graph
[legend]

Public Member Functions

 CPVRTextureHeader ()
 Default constructor for a CPVRTextureHeader. Returns an empty header. More...
 
 CPVRTextureHeader (PVRTextureHeaderV3 fileHeader, uint32 metaDataCount=0, MetaDataBlock *metaData=NULL)
 Creates a new texture header from a PVRTextureHeaderV3, and appends Meta data if any is supplied. More...
 
 CPVRTextureHeader (uint64 u64PixelFormat, uint32 u32Height=1, uint32 u32Width=1, uint32 u32Depth=1, uint32 u32NumMipMaps=1, uint32 u32NumArrayMembers=1, uint32 u32NumFaces=1, EPVRTColourSpace eColourSpace=ePVRTCSpacelRGB, EPVRTVariableType eChannelType=ePVRTVarTypeUnsignedByteNorm, bool bPreMultiplied=false)
 Creates a new texture header based on individual header variables. More...
 
CPVRTextureHeaderoperator= (const CPVRTextureHeader &rhs)
 Will copy the contents and information of another header into this one. More...
 
PVRTextureHeaderV3 getFileHeader () const
 Gets the file header structure. More...
 
PixelType getPixelType () const
 Gets the 64-bit pixel type ID of the texture. More...
 
uint32 getBitsPerPixel () const
 Gets the bits per pixel of the texture format. More...
 
EPVRTColourSpace getColourSpace () const
 Returns the colour space of the texture. More...
 
EPVRTVariableType getChannelType () const
 Returns the variable type that the texture's data is stored in. More...
 
uint32 getWidth (uint32 uiMipLevel=PVRTEX_TOPMIPLEVEL) const
 Gets the width of the user specified MIP-Map level for the texture. More...
 
uint32 getHeight (uint32 uiMipLevel=PVRTEX_TOPMIPLEVEL) const
 Gets the height of the user specified MIP-Map level for the texture. More...
 
uint32 getDepth (uint32 uiMipLevel=PVRTEX_TOPMIPLEVEL) const
 Gets the depth of the user specified MIP-Map level for the texture. More...
 
uint32 getTextureSize (int32 iMipLevel=PVRTEX_ALLMIPLEVELS, bool bAllSurfaces=true, bool bAllFaces=true) const
 Gets the size in PIXELS of the texture, given various input parameters. User can retrieve the total size of either all surfaces or a single surface, all faces or a single face and all MIP-Maps or a single specified MIP level. All of these. More...
 
uint32 getDataSize (int32 iMipLevel=PVRTEX_ALLMIPLEVELS, bool bAllSurfaces=true, bool bAllFaces=true) const
 Gets the size in BYTES of the texture, given various input parameters. User can retrieve the size of either all surfaces or a single surface, all faces or a single face and all MIP-Maps or a single specified MIP level. More...
 
uint32 getNumArrayMembers () const
 Gets the number of array members stored in this texture. More...
 
uint32 getNumMIPLevels () const
 Gets the number of MIP-Map levels stored in this texture. More...
 
uint32 getNumFaces () const
 Gets the number of faces stored in this texture. More...
 
EPVRTOrientation getOrientation (EPVRTAxis axis) const
 Gets the data orientation for this texture. More...
 
bool isFileCompressed () const
 Returns whether or not the texture is compressed using PVRTexLib's FILE compression - this is independent of any texture compression. More...
 
bool isPreMultiplied () const
 Returns whether or not the texture's colour has been pre-multiplied by the alpha values. More...
 
uint32 getMetaDataSize () const
 Returns the total size of the meta data stored in the header. This includes the size of all information stored in all MetaDataBlocks. More...
 
void getOGLFormat (uint32 &internalformat, uint32 &format, uint32 &type) const
 Gets the OpenGL equivalent values of internal format, format and type for this texture. This will return any supported OpenGL texture values, it is up to the user to decide if these are valid for their current platform. More...
 
void getOGLESFormat (uint32 &internalformat, uint32 &format, uint32 &type) const
 Gets the OpenGLES equivalent values of internal format, format and type for this texture. This will return any supported OpenGLES texture values, it is up to the user to decide if these are valid for their current platform. More...
 
uint32 getD3DFormat () const
 Gets the D3DFormat (up to DirectX 9 and Direct 3D Mobile) equivalent values for this texture. This will return any supported D3D texture formats, it is up to the user to decide if this is valid for their current platform. More...
 
uint32 getDXGIFormat () const
 Gets the DXGIFormat (DirectX 10 onward) equivalent values for this texture. This will return any supported DX texture formats, it is up to the user to decide if this is valid for their current platform. More...
 
void setPixelFormat (PixelType uPixelFormat)
 Sets the pixel format for this texture. More...
 
void setColourSpace (EPVRTColourSpace eColourSpace)
 Sets the colour space for this texture. Default is lRGB. More...
 
void setChannelType (EPVRTVariableType eVarType)
 Sets the variable type for the channels in this texture. More...
 
bool setOGLFormat (const uint32 &internalformat, const uint32 &format, const uint32 &type)
 Sets the format of the texture to PVRTexLib's internal representation of the OGL format. More...
 
bool setOGLESFormat (const uint32 &internalformat, const uint32 &format, const uint32 &type)
 Sets the format of the texture to PVRTexLib's internal representation of the OGLES format. More...
 
bool setD3DFormat (const uint32 &DWORD_D3D_FORMAT)
 Sets the format of the texture to PVRTexLib's internal representation of the D3D format. More...
 
bool setDXGIFormat (const uint32 &DWORD_DXGI_FORMAT)
 Sets the format of the texture to PVRTexLib's internal representation of the DXGI format. More...
 
void setWidth (uint32 newWidth)
 Sets the width. More...
 
void setHeight (uint32 newHeight)
 Sets the height. More...
 
void setDepth (uint32 newDepth)
 Sets the depth. More...
 
void setNumArrayMembers (uint32 newNumMembers)
 Sets the depth. More...
 
void setNumMIPLevels (uint32 newNumMIPLevels)
 Sets the number of MIP-Map levels in this texture. More...
 
void setNumFaces (uint32 newNumFaces)
 Sets the number of faces stored in this texture. More...
 
void setOrientation (EPVRTOrientation eAxisOrientation)
 Sets the data orientation for a given axis in this texture. More...
 
void setIsFileCompressed (bool isFileCompressed)
 Sets whether or not the texture is compressed using PVRTexLib's FILE compression - this is independent of any texture compression. Currently unsupported. More...
 
void setIsPreMultiplied (bool isPreMultiplied)
 Sets whether or not the texture's colour has been pre-multiplied by the alpha values. More...
 
bool isBumpMap () const
 Returns whether the texture is a bump map or not. More...
 
float getBumpMapScale () const
 Gets the bump map scaling value for this texture. More...
 
CPVRTString getBumpMapOrder () const
 Gets the bump map channel order relative to rgba. More...
 
int getNumTextureAtlasMembers () const
 Works out the number of possible texture atlas members in the texture based on the w/h/d and the data size. More...
 
const float * getTextureAtlasData () const
 Returns a pointer to the texture atlas data. More...
 
CPVRTString getCubeMapOrder () const
 Gets the cube map face order. More...
 
void getBorder (uint32 &uiBorderWidth, uint32 &uiBorderHeight, uint32 &uiBorderDepth) const
 Obtains the border size in each dimension for this texture. More...
 
MetaDataBlock getMetaData (uint32 DevFOURCC, uint32 u32Key) const
 Returns a block of meta data from the texture. If the meta data doesn't exist, a block with data size 0 will be returned. More...
 
bool hasMetaData (uint32 DevFOURCC, uint32 u32Key) const
 Returns whether or not the specified meta data exists as part of this texture header. More...
 
const MetaDataMapgetMetaDataMap () const
 A pointer directly to the Meta Data Map, to allow users to read out data. More...
 
void setBumpMap (float bumpScale, CPVRTString bumpOrder="xyz")
 Sets a texture's bump map data. More...
 
void setTextureAtlas (float *pAtlasData, uint32 dataSize)
 Sets the texture atlas coordinate meta data for later display. It is up to the user to make sure that this texture atlas data actually makes sense in the context of the header. It is suggested that the "generateTextureAtlas" method in the tools is used to create a texture atlas, manually setting one up is possible but should be done with care. More...
 
void setCubeMapOrder (CPVRTString cubeMapOrder="XxYyZz")
 Sets a texture's bump map data. More...
 
void setBorder (uint32 uiBorderWidth, uint32 uiBorderHeight, uint32 uiBorderDepth)
 Sets a texture's border size data. This value is subtracted from the current texture height/width/depth to get the valid texture data. More...
 
void addMetaData (const MetaDataBlock &MetaBlock)
 Adds an arbitrary piece of meta data. More...
 
void removeMetaData (const uint32 &DevFOURCC, const uint32 &u32Key)
 Removes a specified piece of meta data, if it exists. More...
 

Protected Attributes

PVRTextureHeaderV3 m_sHeader
 Texture header as laid out in a file. More...
 
CPVRTMap< uint32, CPVRTMap
< uint32, MetaDataBlock > > 
m_MetaData
 Map of all the meta data stored for a texture. More...
 

Detailed Description

Wrapper class for PVRTextureHeaderV3, adds 'smart' accessor functions.


Constructor & Destructor Documentation

pvrtexture::CPVRTextureHeader::CPVRTextureHeader ( )

Default constructor for a CPVRTextureHeader. Returns an empty header.


Returns
A new texture header.
pvrtexture::CPVRTextureHeader::CPVRTextureHeader ( PVRTextureHeaderV3  fileHeader,
uint32  metaDataCount = 0,
MetaDataBlock *  metaData = NULL 
)

Creates a new texture header from a PVRTextureHeaderV3, and appends Meta data if any is supplied.


Parameters
[in]fileHeaderPVRTextureHeaderV3
[in]metaDataCountNumber of Meta data blocks to add
[in]metaDataPointer to meta data block
Returns
A new texture header.
pvrtexture::CPVRTextureHeader::CPVRTextureHeader ( uint64  u64PixelFormat,
uint32  u32Height = 1,
uint32  u32Width = 1,
uint32  u32Depth = 1,
uint32  u32NumMipMaps = 1,
uint32  u32NumArrayMembers = 1,
uint32  u32NumFaces = 1,
EPVRTColourSpace  eColourSpace = ePVRTCSpacelRGB,
EPVRTVariableType  eChannelType = ePVRTVarTypeUnsignedByteNorm,
bool  bPreMultiplied = false 
)

Creates a new texture header based on individual header variables.


Parameters
[in]u64PixelFormatPixelFormat
[in]u32HeightTexture height
[in]u32WidthTexture width
[in]u32DepthTexture depth
[in]u32NumMipMapsNumber of MIP Maps
[in]u32NumArrayMembersNumber of array members
[in]u32NumFacesNumber of faces
[in]eColourSpaceColour space
[in]eChannelTypeChannel type
[in]bPreMultipliedWhether or not the texture's colour has been pre-multiplied by the alpha values
Returns
A new texture header.

Member Function Documentation

void pvrtexture::CPVRTextureHeader::addMetaData ( const MetaDataBlock &  MetaBlock)

Adds an arbitrary piece of meta data.


Parameters
[in]MetaBlockMeta data block to be added.
uint32 pvrtexture::CPVRTextureHeader::getBitsPerPixel ( ) const

Gets the bits per pixel of the texture format.


Returns
Number of bits per pixel.
void pvrtexture::CPVRTextureHeader::getBorder ( uint32 uiBorderWidth,
uint32 uiBorderHeight,
uint32 uiBorderDepth 
) const

Obtains the border size in each dimension for this texture.


Parameters
[in]uiBorderWidthBorder width
[in]uiBorderHeightBorder height
[in]uiBorderDepthBorder depth
CPVRTString pvrtexture::CPVRTextureHeader::getBumpMapOrder ( ) const

Gets the bump map channel order relative to rgba.


For example, an RGB texture with bumps mapped to XYZ returns 'xyz'. A BGR texture with bumps in the order ZYX will also return 'xyz' as the mapping is the same: R=X, G=Y, B=Z. If the letter 'h' is present in the string, it means that the height map has been stored here. Other characters are possible if the bump map was created manually, but PVRTexLib will ignore these characters. They are returned simply for completeness.

Returns
Bump map order relative to rgba.
float pvrtexture::CPVRTextureHeader::getBumpMapScale ( ) const

Gets the bump map scaling value for this texture.


If the texture is not a bump map, 0.0f is returned. If the texture is a bump map but no meta data is stored to specify its scale, then 1.0f is returned.

Returns
Returns the bump map scale value as a float.
EPVRTVariableType pvrtexture::CPVRTextureHeader::getChannelType ( ) const

Returns the variable type that the texture's data is stored in.


Returns
enum representing the type of the texture.
EPVRTColourSpace pvrtexture::CPVRTextureHeader::getColourSpace ( ) const

Returns the colour space of the texture.


Returns
enum representing colour space.
CPVRTString pvrtexture::CPVRTextureHeader::getCubeMapOrder ( ) const

Gets the cube map face order.


Returned string will be in the form "ZzXxYy" with capitals representing positive and small letters representing negative. I.e. Z=Z-Positive, z=Z-Negative.

Returns
Cube map order string.
uint32 pvrtexture::CPVRTextureHeader::getD3DFormat ( ) const

Gets the D3DFormat (up to DirectX 9 and Direct 3D Mobile) equivalent values for this texture. This will return any supported D3D texture formats, it is up to the user to decide if this is valid for their current platform.


Returns
D3D format, represented by an uint32.
uint32 pvrtexture::CPVRTextureHeader::getDataSize ( int32  iMipLevel = PVRTEX_ALLMIPLEVELS,
bool  bAllSurfaces = true,
bool  bAllFaces = true 
) const

Gets the size in BYTES of the texture, given various input parameters. User can retrieve the size of either all surfaces or a single surface, all faces or a single face and all MIP-Maps or a single specified MIP level.


Parameters
[in]iMipLevelSpecifies a mip level to check, 'PVRTEX_ALLMIPLEVELS' can be passed to get the size of all MIP levels.
[in]bAllSurfacesSize of all surfaces is calculated if true, only a single surface if false.
[in]bAllFacesSize of all faces is calculated if true, only a single face if false.
Returns
Size in BYTES of the specified texture area.
uint32 pvrtexture::CPVRTextureHeader::getDepth ( uint32  uiMipLevel = PVRTEX_TOPMIPLEVEL) const

Gets the depth of the user specified MIP-Map level for the texture.


Parameters
[in]uiMipLevelMIP level that user is interested in.
Returns
Depth of the specified MIP-Map level.
uint32 pvrtexture::CPVRTextureHeader::getDXGIFormat ( ) const

Gets the DXGIFormat (DirectX 10 onward) equivalent values for this texture. This will return any supported DX texture formats, it is up to the user to decide if this is valid for their current platform.


Returns
GXGIFormat, represented by a uint32.
PVRTextureHeaderV3 pvrtexture::CPVRTextureHeader::getFileHeader ( ) const

Gets the file header structure.


Returns
The file header.
uint32 pvrtexture::CPVRTextureHeader::getHeight ( uint32  uiMipLevel = PVRTEX_TOPMIPLEVEL) const

Gets the height of the user specified MIP-Map level for the texture.


Parameters
[in]uiMipLevelMIP level that user is interested in.
Returns
Height of the specified MIP-Map level.
MetaDataBlock pvrtexture::CPVRTextureHeader::getMetaData ( uint32  DevFOURCC,
uint32  u32Key 
) const

Returns a block of meta data from the texture. If the meta data doesn't exist, a block with data size 0 will be returned.


Parameters
[in]DevFOURCCFour character descriptor representing the creator of the meta data
[in]u32KeyKey value representing the type of meta data stored
Returns
A copy of the meta data from the texture.
const MetaDataMap* pvrtexture::CPVRTextureHeader::getMetaDataMap ( ) const

A pointer directly to the Meta Data Map, to allow users to read out data.


Returns
A direct pointer to the MetaData map.
uint32 pvrtexture::CPVRTextureHeader::getMetaDataSize ( ) const

Returns the total size of the meta data stored in the header. This includes the size of all information stored in all MetaDataBlocks.


Returns
Size, in bytes, of the meta data stored in the header.
uint32 pvrtexture::CPVRTextureHeader::getNumArrayMembers ( ) const

Gets the number of array members stored in this texture.


Returns
Number of array members in this texture.
uint32 pvrtexture::CPVRTextureHeader::getNumFaces ( ) const

Gets the number of faces stored in this texture.


Returns
Number of faces in this texture.
uint32 pvrtexture::CPVRTextureHeader::getNumMIPLevels ( ) const

Gets the number of MIP-Map levels stored in this texture.


Returns
Number of MIP-Map levels in this texture.
int pvrtexture::CPVRTextureHeader::getNumTextureAtlasMembers ( ) const

Works out the number of possible texture atlas members in the texture based on the w/h/d and the data size.


Returns
The number of sub textures defined by meta data.
void pvrtexture::CPVRTextureHeader::getOGLESFormat ( uint32 internalformat,
uint32 format,
uint32 type 
) const

Gets the OpenGLES equivalent values of internal format, format and type for this texture. This will return any supported OpenGLES texture values, it is up to the user to decide if these are valid for their current platform.


Parameters
[in,out]internalformatInternal format
[in,out]formatFormat
[in,out]typeType
void pvrtexture::CPVRTextureHeader::getOGLFormat ( uint32 internalformat,
uint32 format,
uint32 type 
) const

Gets the OpenGL equivalent values of internal format, format and type for this texture. This will return any supported OpenGL texture values, it is up to the user to decide if these are valid for their current platform.


Parameters
[in,out]internalformatInternal format
[in,out]formatFormat
[in,out]typeType
EPVRTOrientation pvrtexture::CPVRTextureHeader::getOrientation ( EPVRTAxis  axis) const

Gets the data orientation for this texture.


Parameters
[in]axisEPVRTAxis type specifying the axis to examine.
Returns
Enum orientation of the axis.
PixelType pvrtexture::CPVRTextureHeader::getPixelType ( ) const

Gets the 64-bit pixel type ID of the texture.


Returns
64-bit pixel type ID.
const float* pvrtexture::CPVRTextureHeader::getTextureAtlasData ( ) const

Returns a pointer to the texture atlas data.


Returns
A pointer directly to the texture atlas data.
uint32 pvrtexture::CPVRTextureHeader::getTextureSize ( int32  iMipLevel = PVRTEX_ALLMIPLEVELS,
bool  bAllSurfaces = true,
bool  bAllFaces = true 
) const

Gets the size in PIXELS of the texture, given various input parameters. User can retrieve the total size of either all surfaces or a single surface, all faces or a single face and all MIP-Maps or a single specified MIP level. All of these.


Parameters
[in]iMipLevelSpecifies a MIP level to check, 'PVRTEX_ALLMIPLEVELS' can be passed to get the size of all MIP levels.
[in]bAllSurfacesSize of all surfaces is calculated if true, only a single surface if false.
[in]bAllFacesSize of all faces is calculated if true, only a single face if false.
Returns
Size in PIXELS of the specified texture area.
uint32 pvrtexture::CPVRTextureHeader::getWidth ( uint32  uiMipLevel = PVRTEX_TOPMIPLEVEL) const

Gets the width of the user specified MIP-Map level for the texture.


Parameters
[in]uiMipLevelMIP level that user is interested in.
Returns
Width of the specified MIP-Map level.
bool pvrtexture::CPVRTextureHeader::hasMetaData ( uint32  DevFOURCC,
uint32  u32Key 
) const

Returns whether or not the specified meta data exists as part of this texture header.


Parameters
[in]DevFOURCCFour character descriptor representing the creator of the meta data
[in]u32KeyKey value representing the type of meta data stored
Returns
True if the specified meta data bock exists
bool pvrtexture::CPVRTextureHeader::isBumpMap ( ) const

Returns whether the texture is a bump map or not.


Returns
True if the texture is a bump map.
bool pvrtexture::CPVRTextureHeader::isFileCompressed ( ) const

Returns whether or not the texture is compressed using PVRTexLib's FILE compression - this is independent of any texture compression.


Returns
True if it is file compressed.
bool pvrtexture::CPVRTextureHeader::isPreMultiplied ( ) const

Returns whether or not the texture's colour has been pre-multiplied by the alpha values.


Returns
True if texture is premultiplied.
CPVRTextureHeader& pvrtexture::CPVRTextureHeader::operator= ( const CPVRTextureHeader rhs)

Will copy the contents and information of another header into this one.


Parameters
[in]rhsHeader to copy.
Returns
This header.
void pvrtexture::CPVRTextureHeader::removeMetaData ( const uint32 DevFOURCC,
const uint32 u32Key 
)

Removes a specified piece of meta data, if it exists.


Parameters
[in]DevFOURCCFour character descriptor representing the creator of the meta data
[in]u32KeyKey value representing the type of meta data stored
void pvrtexture::CPVRTextureHeader::setBorder ( uint32  uiBorderWidth,
uint32  uiBorderHeight,
uint32  uiBorderDepth 
)

Sets a texture's border size data. This value is subtracted from the current texture height/width/depth to get the valid texture data.


Parameters
[in]uiBorderWidthBorder width
[in]uiBorderHeightBorder height
[in]uiBorderDepthBorder depth
void pvrtexture::CPVRTextureHeader::setBumpMap ( float  bumpScale,
CPVRTString  bumpOrder = "xyz" 
)

Sets a texture's bump map data.


Parameters
[in]bumpScaleFloating point "height" value to scale the bump map.
[in]bumpOrderUp to 4 character string, with values x,y,z,h in some combination. Not all values need to be present. Denotes channel order; x,y,z refer to the corresponding axes, h indicates presence of the original height map. It is possible to have only some of these values rather than all. For example if 'h' is present alone it will be considered a height map. The values should be presented in RGBA order, regardless of the texture format, so a zyxh order in a bgra texture should still be passed as 'xyzh'. Capitals are allowed. Any character stored here that is not one of x,y,z,h or a NULL character will be ignored when PVRTexLib reads the data, but will be preserved. This is useful if you wish to define a custom data channel for instance. In these instances PVRTexLib will assume it is simply colour data.
void pvrtexture::CPVRTextureHeader::setChannelType ( EPVRTVariableType  eVarType)

Sets the variable type for the channels in this texture.


Parameters
[in]eVarTypeA variable type enum.
void pvrtexture::CPVRTextureHeader::setColourSpace ( EPVRTColourSpace  eColourSpace)

Sets the colour space for this texture. Default is lRGB.


Parameters
[in]eColourSpaceA colour space enum.
void pvrtexture::CPVRTextureHeader::setCubeMapOrder ( CPVRTString  cubeMapOrder = "XxYyZz")

Sets a texture's bump map data.


Parameters
[in]cubeMapOrderUp to 6 character string, with values x,X,y,Y,z,Z in some combination. Not all values need to be present. Denotes face order; Capitals refer to positive axis positions and small letters refer to negative axis positions. E.g. x=X-Negative, X=X-Positive. It is possible to have only some of these values rather than all, as long as they are NULL terminated. NB: Values past the 6th character are not read.
bool pvrtexture::CPVRTextureHeader::setD3DFormat ( const uint32 DWORD_D3D_FORMAT)

Sets the format of the texture to PVRTexLib's internal representation of the D3D format.


Returns
True if successful.
void pvrtexture::CPVRTextureHeader::setDepth ( uint32  newDepth)

Sets the depth.


Parameters
[in]newDepthThe new depth.
bool pvrtexture::CPVRTextureHeader::setDXGIFormat ( const uint32 DWORD_DXGI_FORMAT)

Sets the format of the texture to PVRTexLib's internal representation of the DXGI format.


Returns
True if successful.
void pvrtexture::CPVRTextureHeader::setHeight ( uint32  newHeight)

Sets the height.


Parameters
[in]newHeightThe new height.
void pvrtexture::CPVRTextureHeader::setIsFileCompressed ( bool  isFileCompressed)

Sets whether or not the texture is compressed using PVRTexLib's FILE compression - this is independent of any texture compression. Currently unsupported.


Parameters
[in]isFileCompressedSets file compression to true/false.
void pvrtexture::CPVRTextureHeader::setIsPreMultiplied ( bool  isPreMultiplied)

Sets whether or not the texture's colour has been pre-multiplied by the alpha values.


Returns
isPreMultiplied Sets if texture is premultiplied.
void pvrtexture::CPVRTextureHeader::setNumArrayMembers ( uint32  newNumMembers)

Sets the depth.


Parameters
[in]newNumMembersThe new number of members in this array.
void pvrtexture::CPVRTextureHeader::setNumFaces ( uint32  newNumFaces)

Sets the number of faces stored in this texture.


Parameters
[in]newNumFacesNew number of faces for this texture.
void pvrtexture::CPVRTextureHeader::setNumMIPLevels ( uint32  newNumMIPLevels)

Sets the number of MIP-Map levels in this texture.


Parameters
[in]newNumMIPLevelsNew number of MIP-Map levels.
bool pvrtexture::CPVRTextureHeader::setOGLESFormat ( const uint32 internalformat,
const uint32 format,
const uint32 type 
)

Sets the format of the texture to PVRTexLib's internal representation of the OGLES format.


Parameters
[in,out]internalformatInternal format
[in,out]formatFormat
[in,out]typeType
Returns
True if successful.
bool pvrtexture::CPVRTextureHeader::setOGLFormat ( const uint32 internalformat,
const uint32 format,
const uint32 type 
)

Sets the format of the texture to PVRTexLib's internal representation of the OGL format.


Parameters
[in,out]internalformatInternal format
[in,out]formatFormat
[in,out]typeType
Returns
True if successful.
void pvrtexture::CPVRTextureHeader::setOrientation ( EPVRTOrientation  eAxisOrientation)

Sets the data orientation for a given axis in this texture.


Parameters
[in]eAxisOrientationEnum specifying axis and orientation.
void pvrtexture::CPVRTextureHeader::setPixelFormat ( PixelType  uPixelFormat)

Sets the pixel format for this texture.


Parameters
[in]uPixelFormatThe format of the pixel.
void pvrtexture::CPVRTextureHeader::setTextureAtlas ( float *  pAtlasData,
uint32  dataSize 
)

Sets the texture atlas coordinate meta data for later display. It is up to the user to make sure that this texture atlas data actually makes sense in the context of the header. It is suggested that the "generateTextureAtlas" method in the tools is used to create a texture atlas, manually setting one up is possible but should be done with care.


Parameters
[in]pAtlasDataPointer to an array of atlas data.
[in]dataSizeNumber of floats that the data pointer contains.
void pvrtexture::CPVRTextureHeader::setWidth ( uint32  newWidth)

Sets the width.


Parameters
[in]newWidthThe new width.

Member Data Documentation

CPVRTMap<uint32, CPVRTMap<uint32,MetaDataBlock> > pvrtexture::CPVRTextureHeader::m_MetaData
protected

Map of all the meta data stored for a texture.

PVRTextureHeaderV3 pvrtexture::CPVRTextureHeader::m_sHeader
protected

Texture header as laid out in a file.


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