CrystalSpace

Public API Reference

CS::StructuredTextureFormat Class Reference
[3D]

Structured representation of a texture format. More...

#include <csgfx/textureformatstrings.h>

List of all members.

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 (const StructuredTextureFormat &other)
 Copy constructor.
 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 ()
 Construct an invalid texture format.
 ~StructuredTextureFormat ()
 Destruct 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:

Generated for Crystal Space 2.0 by doxygen 1.6.1