![]() |
Public API Reference |
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... | |
| 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. | |
| void | SetFormat (TextureFormat format) |
| Set the format. | |
| void | SetSpecial (const char *special) |
| A special format (like '*dxt1'). | |
| StructuredTextureFormat () | |
| Construct an invalid texture format. | |
| StructuredTextureFormat (char cmp1, int size1, char cmp2=0, int size2=0, char cmp3=0, int size3=0, char cmp4=0, int size4=0, TextureFormat fmt=Integer) | |
| Construct a texture format with the given components and sizes. | |
| StructuredTextureFormat (const StructuredTextureFormat &other) | |
| Copy constructor. | |
| ~StructuredTextureFormat () | |
| Destruct texture format. | |
Structured representation of a texture format.
Definition at line 126 of file textureformatstrings.h.