DDSFile
Engine/source/gfx/bitmap/ddsFile.h
Classes:
Public Types
_Anonymous_ { Cubemap_Surface_PosX Cubemap_Surface_NegX Cubemap_Surface_PosY Cubemap_Surface_NegY Cubemap_Surface_PosZ Cubemap_Surface_NegZ Cubemap_Surface_Count }
The index into mSurfaces for each cubemap face.
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) CubeMap_PosX_Flag = BIT(8) CubeMap_NegX_Flag = BIT(9) CubeMap_PosY_Flag = BIT(10) CubeMap_NegY_Flag = BIT(11) CubeMap_PosZ_Flag = BIT(12) CubeMap_NegZ_Flag = BIT(13) CubeMap_All_Flags = CubeMapFlag|CubeMap_PosX_Flag | CubeMap_NegX_Flag | CubeMap_PosY_Flag | CubeMap_NegY_Flag | CubeMap_PosZ_Flag | CubeMap_NegZ_Flag }
Public Attributes
Public Static Attributes
Public Functions
DDSFile()
~DDSFile()
bool
decompressToGBitmap(GBitmap * dest)
bool
Returns the total video memory size of the texture including all mipmaps and compression settings.
getSurfacePitch(U32 mipLevel)
getSurfaceSize(U32 height, U32 width, U32 mipLevel)
getSurfaceSize(U32 mipLevel)
For our current format etc., what is the size of a surface with the given dimensions?
bool
bool
readHeader(Stream & s)
Called from read() to read in the DDS header.
bool
writeHeader(Stream & s)
Called from write() to write the DDS header.
Public Static Functions
DDSFile *
createDDSCubemapFileFromGBitmaps(GBitmap ** gbmps)
DDSFile *
createDDSFileFromGBitmap(const GBitmap * gbmp)
Detailed Description
Public Types
@83
Enumerator
- Cubemap_Surface_PosX
- Cubemap_Surface_NegX
- Cubemap_Surface_PosY
- Cubemap_Surface_NegY
- Cubemap_Surface_PosZ
- Cubemap_Surface_NegZ
- Cubemap_Surface_Count
The index into mSurfaces for each cubemap face.
DDSFlags
Enumerator
- 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.
- CubeMap_PosX_Flag = BIT(8)
These are the flags for which cubemap surfaces are included in the file.
- CubeMap_NegX_Flag = BIT(9)
- CubeMap_PosY_Flag = BIT(10)
- CubeMap_NegY_Flag = BIT(11)
- CubeMap_PosZ_Flag = BIT(12)
- CubeMap_NegZ_Flag = BIT(13)
- CubeMap_All_Flags = CubeMapFlag|CubeMap_PosX_Flag | CubeMap_NegX_Flag | CubeMap_PosY_Flag | CubeMap_NegY_Flag | CubeMap_PosZ_Flag | CubeMap_NegZ_Flag
Public Attributes
U32 mBytesPerPixel
Ignored if we're a compressed texture.
String mCacheString
U32 mDepth
BitSet32 mFlags
GFXFormat mFormat
U32 mFourCC
bool mHasTransparency
U32 mHeight
U32 mMipMapCount
U32 mPitchOrLinearSize
Torque::Path mSourcePath
Vector< SurfaceData * > mSurfaces
U32 mWidth
Public Static Attributes
S32 smActiveCopies
U32 smDropMipCount
Public Functions
DDSFile()
DDSFile(const DDSFile & dds)
~DDSFile()
clear()
Clear all our information; used before reading.
decompressToGBitmap(GBitmap * dest)
getDepth(U32 mipLevel)
getFormat()
getHasTransparency()
getHeight(U32 mipLevel)
getMipLevels()
getSizeInBytes()
Returns the total video memory size of the texture including all mipmaps and compression settings.
getSourcePath()
getSurfacePitch(U32 mipLevel)
getSurfaceSize(U32 height, U32 width, U32 mipLevel)
getSurfaceSize(U32 mipLevel)
For our current format etc., what is the size of a surface with the given dimensions?
getTextureCacheString()
getWidth(U32 mipLevel)
isCubemap()
read(Stream & s, U32 dropMipCount)
Reads a DDS file from the stream.
readHeader(Stream & s)
Called from read() to read in the DDS header.
write(Stream & s)
Writes this DDS file to the stream.
writeHeader(Stream & s)
Called from write() to write the DDS header.
Public Static Functions
createDDSCubemapFileFromGBitmaps(GBitmap ** gbmps)
createDDSFileFromGBitmap(const GBitmap * gbmp)
getSizeInBytes(GFXFormat format, U32 height, U32 width, U32 mipLevels)
load(const Torque::Path & path, U32 dropMipCount)