CS::StructuredTextureFormat Class Reference
[3D]
Structured representation of a texture format.
More...
#include <csgfx/textureformatstrings.h>
Public Types | |
enum | { compR = 0x01, compG = 0x02, compB = 0x04, compA = 0x08, compX = 0x10, compL = 0x20, compD = 0x40, compS = 0x80, compRGB = compR | compB | compG, compRGBA = compR | compB | compG | compA, compLumA = compL | compA, compDepthStencil = compD | compS, compUnknown = 0x80000000 } |
Bit flags for components present in a format. More... | |
compA = 0x08 | |
'a' component | |
compB = 0x04 | |
'b' component | |
compD = 0x40 | |
'd' component | |
compDepthStencil = compD | compS | |
'd' and 's' components | |
compG = 0x02 | |
'g' component | |
compL = 0x20 | |
'l' component | |
compLumA = compL | compA | |
'l' and 'a' components | |
compR = 0x01 | |
'r' component | |
compRGB = compR | compB | compG | |
'r', 'g' and 'b' components | |
compRGBA = compR | compB | compG | compA | |
'r', 'g', 'b' and 'a' components | |
compS = 0x80 | |
's' component | |
compUnknown = 0x80000000 | |
One or more components are unknown. | |
compX = 0x10 | |
'x' component | |
Float = 'f' | |
Components are stored as float tuples. | |
Integer = 'i' | |
Components are stored as integer tuples. | |
Invalid = '-' | |
Invalid format. | |
Special = '*' | |
"Special" format (e.g. compressed formats) | |
enum | TextureFormat { Invalid = '-', Integer = 'i', Float = 'f', Special = '*' } |
Texture storage format. More... | |
Public Member Functions | |
bool | AddComponent (char cmp, int size) |
Add a new component to the texture format. | |
void | FixSizes (int size) |
Fix the unset sizes (i.e. | |
csString | GetCanonical () |
Convert this structured format to canonical format. | |
char | GetComponent (int n) const |
Get the nth component. | |
int | GetComponentCount () const |
Returns the number of components in this format. | |
uint | GetComponentMask () const |
Return a bit mask that identifies the contained components, regardless of their order. | |
char | GetComponentSize (int n) const |
Get size of the nth component. | |
TextureFormat | GetFormat () const |
Returns the basic storage type for this texture format. | |
const char * | GetSpecial () const |
Return the special format string. | |
bool | IsValid () |
Returns whether the contained format is a valid texture format. | |
bool | operator== (const StructuredTextureFormat &other) const |
void | SetFormat (TextureFormat format) |
Set the format. | |
void | SetSpecial (const char *special) |
A special format (like '*dxt1'). | |
StructuredTextureFormat () | |
Construct an invalid texture format. |
Detailed Description
Structured representation of a texture format.
Definition at line 126 of file textureformatstrings.h.
Member Enumeration Documentation
Texture storage format.
- Enumerator:
-
Invalid Invalid format. Integer Components are stored as integer tuples. Float Components are stored as float tuples. Special "Special" format (e.g. compressed formats)
Definition at line 130 of file textureformatstrings.h.
The documentation for this class was generated from the following file:
- csgfx/textureformatstrings.h
Generated for Crystal Space 1.2 by doxygen 1.4.7