Overview   Project   Class   Tree   Deprecated   Index 
0 A.D.
FRAMES    NO FRAMES
SUMMARY:  INNER | FIELD | CONSTR | METHOD

lib.res.graphics
Enum TexFlags

   in tex.h

flags describing the pixel format. these are to be interpreted as deviations from "plain" format, i.e. uncompressed RGB.


Field Summary
DXT1A = 7
          we need a special value for DXT1a to avoid having to consider flags & TEX_ALPHA to determine S3TC type.
TEX_ALPHA = 0x10
          indicates the image contains an alpha channel.
TEX_BGR = 0x08
          indicates B and R pixel components are exchanged.
TEX_BOTTOM_UP = 0x40
          flags & TEX_ORIENTATION is a field indicating orientation, i.
TEX_DXT = 0x7
          flags & TEX_DXT is a field indicating compression.
TEX_GREY = 0x20
          indicates the image is 8bpp greyscale.
TEX_MIPMAPS = 0x100
          indicates the image data includes mipmaps.
TEX_ORIENTATION = TEX_BOTTOM_UP | TEX_TOP_DOWN
          mask
TEX_TOP_DOWN = 0x80
          
 

Field Detail

DXT1A

public DXT1A = 7
we need a special value for DXT1a to avoid having to consider flags & TEX_ALPHA to determine S3TC type. the value is arbitrary; do not rely on it!

TEX_ALPHA

public TEX_ALPHA = 0x10
indicates the image contains an alpha channel. this is set for your convenience - there are many formats containing alpha and divining this information from them is hard. (conversion is not applicable here)

TEX_BGR

public TEX_BGR = 0x08
indicates B and R pixel components are exchanged. depending on flags & TEX_ALPHA or bpp, this means either BGR or BGRA. not converted by default - it's an acceptable format for OpenGL.

TEX_BOTTOM_UP

public TEX_BOTTOM_UP = 0x40
flags & TEX_ORIENTATION is a field indicating orientation, i.e. in what order the pixel rows are stored. tex_load always sets this to the global orientation (and flips the image accordingly to match). texture codecs may in intermediate steps during loading set this to 0 if they don't know which way around they are (e.g. DDS), or to whatever their file contains.

TEX_DXT

public TEX_DXT = 0x7
flags & TEX_DXT is a field indicating compression. if 0, the texture is uncompressed; otherwise, it holds the S3TC type: 1,3,5 or DXT1A. not converted by default - glCompressedTexImage2D receives the compressed data.

TEX_GREY

public TEX_GREY = 0x20
indicates the image is 8bpp greyscale. this is required to differentiate between alpha-only and intensity formats. not converted by default - it's an acceptable format for OpenGL.

TEX_MIPMAPS

public TEX_MIPMAPS = 0x100
indicates the image data includes mipmaps. they are stored from lowest to highest (1x1), one after the other. (conversion is not applicable here)

TEX_ORIENTATION

public TEX_ORIENTATION = TEX_BOTTOM_UP | TEX_TOP_DOWN
mask

TEX_TOP_DOWN

public TEX_TOP_DOWN = 0x80

 Overview   Project   Class   Tree   Deprecated   Index 
0 A.D.
Generated on September 04, 2007 at 18:14
CppDoc v2.4.0
FRAMES    NO FRAMES
SUMMARY:  INNER | FIELD | CONSTR | METHOD