DDSFile Struct Reference

#include <ddsFile.h>

List of all members.

Public Types

 ComplexFlag = BIT(0)
 Indicates this includes a mipchain, cubemap, or volume texture, ie, isn't a plain old bitmap.
 MipMapsFlag = BIT(1)
 Indicates we have a mipmap chain in the file.
 CubeMapFlag = BIT(2)
 Indicates we are a cubemap. Requires all six faces.
 VolumeFlag = BIT(3)
 Indicates we are a volume texture.
 PitchSizeFlag = BIT(4)
 Cue as to how to interpret our pitchlinear value.
 LinearSizeFlag = BIT(5)
 Cue as to how to interpret our pitchlinear value.
 RGBData = BIT(6)
 Indicates that this is straight out RGBA data.
 CompressedData = BIT(7)
 Indicates that this is compressed or otherwise exotic data.
enum  DDSFlags {
  ComplexFlag = BIT(0),
  MipMapsFlag = BIT(1),
  CubeMapFlag = BIT(2),
  VolumeFlag = BIT(3),
  PitchSizeFlag = BIT(4),
  LinearSizeFlag = BIT(5),
  RGBData = BIT(6),
  CompressedData = BIT(7)
}

Public Member Functions

void clear ()
 Clear all our information; used before reading.
bool readHeader (Stream &s)
 Read a DDS header from the stream.
bool read (Stream &s)
U32 getSurfaceSize (U32 mipLevel=0) const
 For our current format etc., what is the size of a surface with the given dimensions?
U32 getSurfaceSize (U32 height, U32 width, U32 mipLevel=0) const
const U32 getWidth (const U32 mipLevel=0) const
const U32 getHeight (const U32 mipLevel=0) const
const U32 getDepth (const U32 mipLevel=0) const
const bool getHasTransparency () const
const U32 getPitch (const U32 mipLevel=0) const
const Torque::PathgetSourcePath () const
const StringgetTextureCacheString () const
 DDSFile ()
 ~DDSFile ()

Static Public Member Functions

static Resource< DDSFileload (const Torque::Path &path)
static DDSFilecreateDDSFileFromGBitmap (const GBitmap *gbmp)

Public Attributes

BitSet32 mFlags
U32 mHeight
U32 mWidth
U32 mDepth
U32 mPitchOrLinearSize
U32 mMipMapCount
GFXFormat mFormat
U32 mBytesPerPixel
 Ignored if we're a compressed texture.
U32 mFourCC
String mCacheString
Torque::Path mSourcePath
bool mHasTransparency
Vector< SurfaceData * > mSurfaces

Static Public Attributes

static S32 smActiveCopies

Classes

struct  SurfaceData


Member Enumeration Documentation

Enumerator:
ComplexFlag  Indicates this includes a mipchain, cubemap, or volume texture, ie, isn't a plain old bitmap.
MipMapsFlag  Indicates we have a mipmap chain in the file.
CubeMapFlag  Indicates we are a cubemap. Requires all six faces.
VolumeFlag  Indicates we are a volume texture.
PitchSizeFlag  Cue as to how to interpret our pitchlinear value.
LinearSizeFlag  Cue as to how to interpret our pitchlinear value.
RGBData  Indicates that this is straight out RGBA data.
CompressedData  Indicates that this is compressed or otherwise exotic data.


Constructor & Destructor Documentation

DDSFile::DDSFile (  )  [inline]

DDSFile::~DDSFile (  )  [inline]


Member Function Documentation

void DDSFile::clear (  ) 

Clear all our information; used before reading.

bool DDSFile::readHeader ( Stream s  ) 

Read a DDS header from the stream.

bool DDSFile::read ( Stream s  ) 

U32 DDSFile::getSurfaceSize ( U32  mipLevel = 0  )  const [inline]

For our current format etc., what is the size of a surface with the given dimensions?

U32 DDSFile::getSurfaceSize ( U32  height,
U32  width,
U32  mipLevel = 0 
) const

const U32 DDSFile::getWidth ( const U32  mipLevel = 0  )  const [inline]

const U32 DDSFile::getHeight ( const U32  mipLevel = 0  )  const [inline]

const U32 DDSFile::getDepth ( const U32  mipLevel = 0  )  const [inline]

const bool DDSFile::getHasTransparency (  )  const [inline]

const U32 DDSFile::getPitch ( const U32  mipLevel = 0  )  const [inline]

const Torque::Path& DDSFile::getSourcePath (  )  const [inline]

const String& DDSFile::getTextureCacheString (  )  const [inline]

static Resource<DDSFile> DDSFile::load ( const Torque::Path path  )  [static]

static DDSFile* DDSFile::createDDSFileFromGBitmap ( const GBitmap gbmp  )  [static]


Member Data Documentation

Ignored if we're a compressed texture.