struct TextureHeader
Defined in:
The C4Textures.h
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). |
uint32 textureFlags; |
The texture image flags. |
TextureSemantic colorSemantic; |
The semantic usage for the color channels. |
TextureSemantic alphaSemantic; |
The semantic usage for the alpha channel. |
TextureFormat textureFormat; |
The format of the texture image. |
int32 textureWidth; |
The width of the texture map. |
int32 textureHeight; |
The height of the texture map. |
int32 textureDepth; |
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.
|
uint32 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.
kTextureType2D |
2D texture map. |
kTextureType3D |
3D texture map. |
kTextureTypeCube |
Cube texture map. |
kTextureTypeRectangle |
Rectangle texture map. |
kTextureTypeArray2D |
Array 2D texture map. |
textureFlags
member can be a combination (through logical OR) of the following constants.
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. |
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. |
textureFormat
member can be one of the following constants.
kTextureFormatLinearRGBA |
4x8-bit RGBA in linear space with alpha channel. |
kTextureFormatLinearRGBX |
4x8-bit RGB in linear space (alpha unused). |
kTextureFormatGammaRGBA |
4x8-bit RGBA in sRGB space with alpha channel. |
kTextureFormatGammaRGBX |
4x8-bit RGB in sRGB space (alpha unused). |
kTextureFormatLinearRG |
2x8-bit RG in linear space. |
kTextureFormatLinearR |
1x8-bit R in linear space. |
kTextureFormatSignedRGBA |
4x8-bit signed normalized RGBA. |
kTextureFormatSignedRG |
2x8-bit signed normalized RG. |
kTextureFormatSignedR |
1x8-bit signed normalized R. |
kTextureFormatCompLinearRGBA |
4x8-bit RGBA in linear space with alpha channel, block compressed. |
kTextureFormatCompLinearRGBX |
4x8-bit RGB in linear space (alpha unused), block compressed. |
kTextureFormatCompGammaRGBA |
4x8-bit RGBA in sRGB space with alpha channel, block compressed. |
kTextureFormatCompGammaRGBX |
4x8-bit RGB in sRGB space (alpha unused), block compressed. |
kTextureFormatCompLinearRG |
2x8-bit RG in linear space, block compressed. |
kTextureFormatCompLinearR |
1x8-bit R in linear space, block compressed. |
kTextureFormatCompSignedRG |
2x8-bit signed normalized RG, block compressed. |
kTextureFormatCompSignedR |
1x8-bit signed normalized R, block compressed. |
kTextureFormatHalfRGBA |
4x16-bit float RGBA. |
kTextureFormatHalfRG |
2x16-bit float RG. |
kTextureFormatHalfR |
1x16-bit float R. |
kTextureFormatFloatRGBA |
4x32-bit float RGBA. |
kTextureFormatUint16RGBA |
4x16-bit unsigned int RGBA. |
kTextureFormatUint16RG |
2x16-bit unsigned int RG. |
kTextureFormatUint16R |
1x16-bit unsigned int R. |
kTextureFormatSharedExpRGB |
3x9-bit RGB with 5-bit shared exponent. |
kTextureFormatRGBA4444 |
4x4-bit RGBA in linear space with alpha channel. |
kTextureFormatLuminanceAlpha |
2x8-bit luminance-alpha. |
kTextureFormatLuminance |
8-bit luminance. |
kTextureFormatIntensity |
8-bit intensity. |
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 kTextureTypeRectangle
, in which case the wrap modes must all be kTextureWrapClamp
.
kTextureWrapRepeat |
Repeat. |
kTextureWrapClamp |
Clamp to edge. |
kTextureWrapBorder |
Clamp to border. |
kTextureWrapMirrorRepeat |
Mirror and repeat. |
kTextureWrapMirrorClamp |
Mirror once and clamp to edge. |
See Also