Facebook Twitter YouTube

struct TextureHeader

Defined in:  TSTextures.h
The TextureHeader structure contains information about a texture map.
Definition

struct TextureHeader

Data Members
TextureType         textureType; The texture type (2D, 3D, cube, rectangle, or 2D array).
unsigned_int32      textureFlags; The texture image flags.
TextureSemantic     colorSemantic; The semantic usage for the color channels.
TextureSemantic     alphaSemantic; The semantic usage for the alpha channel.
TextureFormat       imageFormat; The format of the texture image.
int32               imageWidth; The width of the texture map.
int32               imageHeight; The height of the texture map.
int32               imageDepth; The depth of the texture map (value is 1 for a 2D texture).
TextureWrap         wrapMode[3]; The wrap mode for each coordinate.
int32               mipmapCount; The number of mipmap levels.
int32               mipmapDataOffset; The offset to the mipmap data array, in bytes relative to the beginning of the TextureHeader structure. This should be 0 for textures created in memory.
unsigned_int32      auxiliaryDataSize; The size of the auxiliary data, in bytes. This should be 0 for textures created in memory.
int32               auxiliaryDataOffset; The offset to the auxiliary data, in bytes relative to the beginning of the TextureHeader structure. This should be 0 for textures created in memory.
Description
The TextureHeader structure contains information about a texture map and is useful when creating a texture image in memory. A texture header can be filled in and passed to the Texture::GetTexture function to create a new texture object.

The textureType member can be one of the following constants.
kTexture2D 2D texture map.
kTexture3D 3D texture map.
kTextureCube Cube texture map.
kTextureRectangle Rectangle texture map.
kTextureArray2D Array 2D texture map.
The textureFlags member can be a combination (through logical OR) of the following constants.
kTextureSrgbColor The color values are encoded in sRGB space (ignored for 1-channel and 2-channel textures).
kTextureFilterInhibit Do not filter the texture (bilinear, trilinear, or anisotropic).
kTextureAnisotropicFilterInhibit Do not apply anisotropic filtering to the texture (but still allow ordinary bilinear or trilinear filtering).
kTextureForceHighQuality Always use the highest resolution image available, even if a lower quality level is selected in the Graphics Manager.
The colorSemantic and alphaSemantic members denote the type of information that is stored in the color channels and the alpha channel of the texture image, respectively. They can each be one of the following constants.
kTextureSemanticNone No meaning.
kTextureSemanticData Generic data.
kTextureSemanticDiffuse Diffuse color map.
kTextureSemanticSpecular Specular color map.
kTextureSemanticEmission Emission color map.
kTextureSemanticOpacity Refractive opacity map.
kTextureSemanticEnvironment Environment map.
kTextureSemanticLight Light projection.
kTextureSemanticNormal Normal map.
kTextureSemanticParallax Parallax data.
kTextureSemanticHorizon Horizon map.
kTextureSemanticTransparency Transparency.
kTextureSemanticOcclusion Ambient occlusion.
kTextureSemanticGlow Glow intensity.
The imageFormat member can be one of the following constants.
kTextureRGBA 4x8-bit RGBA.
kTextureCompressed BC1 or BC3 compressed.
kTextureRedGreen 2x8-bit red-green.
kTextureRed 8-bit red.
kTextureLuminanceAlpha 2x8-bit luminance-alpha.
kTextureLuminance 8-bit luminance.
kTextureIntensity 8-bit intensity.
kTextureFloatRGBA 4x32-bit float RGBA.
kTextureHalfRGBA 4x16-bit float RGBA.
kTextureUintRGBA 4x16-bit unsigned int RGBA.
kTextureUintRedGreen 2x16-bit unsigned int red-green.
The wrapMode array contains the wrap mode for each of the three texture mapping axes. They can each be one of the following constants unless textureType is kTextureRectangle, in which case the wrap modes must all be kTextureClamp.
kTextureRepeat Repeat.
kTextureClamp Clamp to edge.
kTextureClampBorder Clamp to border.
kTextureMirrorRepeat Mirror and repeat.
kTextureMirrorClamp Mirror once and clamp to edge.
kTextureMirrorClampBorder Mirror once and clamp to border.
See Also

Texture::GetTexture