|
xoreos
0.0.5
|
#include <dds.h>


Classes | |
| struct | DDSPixelFormat |
| The specific pixel format of the included image data. More... | |
Public Member Functions | |
| DDS (Common::SeekableReadStream &dds) | |
| ~DDS () | |
Public Member Functions inherited from Graphics::ImageDecoder | |
| ImageDecoder () | |
| ImageDecoder (const ImageDecoder &image) | |
| virtual | ~ImageDecoder () |
| ImageDecoder & | operator= (const ImageDecoder &image) |
| bool | isCompressed () const |
| Is the image data compressed? More... | |
| bool | hasAlpha () const |
| Does the image data have alpha? . More... | |
| PixelFormat | getFormat () const |
| Return the image data's general format. More... | |
| PixelFormatRaw | getFormatRaw () const |
| Return the image data's raw format. More... | |
| PixelDataType | getDataType () const |
| Return the image data pixel's type. More... | |
| size_t | getMipMapCount () const |
| Return the number of mip maps contained in the image. More... | |
| size_t | getLayerCount () const |
| Return the number of layers contained in the image. More... | |
| bool | isCubeMap () const |
| Is this image a cube map? More... | |
| const MipMap & | getMipMap (size_t mipMap, size_t layer=0) const |
| Return a mip map. More... | |
| void | decompress () |
| Manually decompress the texture image data. More... | |
| const TXI & | getTXI () const |
| Return the texture information TXI, which may be embedded in the image. More... | |
| bool | dumpTGA (const Common::UString &fileName) const |
| Dump the image into a TGA. More... | |
Private Types | |
| enum | DataType { kDataTypeDirect, kDataType4444 } |
Private Member Functions | |
| void | load (Common::SeekableReadStream &dds) |
| void | readHeader (Common::SeekableReadStream &dds, DataType &dataType) |
| void | readStandardHeader (Common::SeekableReadStream &dds, DataType &dataType) |
| void | readBioWareHeader (Common::SeekableReadStream &dds, DataType &dataType) |
| void | readData (Common::SeekableReadStream &dds, DataType dataType) |
| void | detectFormat (const DDSPixelFormat &format, DataType &dataType) |
| void | setSize (MipMap &mipMap) |
Additional Inherited Members | |
Protected Types inherited from Graphics::ImageDecoder | |
| typedef Common::PtrVector< MipMap > | MipMaps |
Static Protected Member Functions inherited from Graphics::ImageDecoder | |
| static void | decompress (MipMap &out, const MipMap &in, PixelFormatRaw format) |
Protected Attributes inherited from Graphics::ImageDecoder | |
| bool | _compressed |
| bool | _hasAlpha |
| PixelFormat | _format |
| PixelFormatRaw | _formatRaw |
| PixelDataType | _dataType |
| size_t | _layerCount |
| Number of layers in this image. More... | |
| bool | _isCubeMap |
| Is this image a cube map? A cube map always needs to have 6 layers! More... | |
| MipMaps | _mipMaps |
| TXI | _txi |
DDS texture.
There are two different DDS file formats:
|
private |
| Graphics::DDS::DDS | ( | Common::SeekableReadStream & | dds | ) |
|
private |
Definition at line 240 of file dds.cpp.
References Graphics::ImageDecoder::_compressed, Graphics::ImageDecoder::_dataType, Graphics::ImageDecoder::_format, Graphics::ImageDecoder::_formatRaw, Graphics::ImageDecoder::_hasAlpha, Graphics::DDS::DDSPixelFormat::aBitMask, Graphics::DDS::DDSPixelFormat::bBitMask, Graphics::DDS::DDSPixelFormat::bitCount, Graphics::DDS::DDSPixelFormat::flags, Graphics::DDS::DDSPixelFormat::fourCC, Graphics::DDS::DDSPixelFormat::gBitMask, kDataType4444, kDataTypeDirect, kDXT1ID, kDXT3ID, kDXT5ID, Graphics::kPixelDataType1555, Graphics::kPixelDataType565, Graphics::kPixelDataType8, kPixelFlagsHasAlpha, kPixelFlagsHasFourCC, kPixelFlagsIsIndexed, kPixelFlagsIsRGB, Graphics::kPixelFormatBGR, Graphics::kPixelFormatBGRA, Graphics::kPixelFormatDXT1, Graphics::kPixelFormatDXT3, Graphics::kPixelFormatDXT5, Graphics::kPixelFormatRGB5, Graphics::kPixelFormatRGB5A1, Graphics::kPixelFormatRGB8, Graphics::kPixelFormatRGBA8, Graphics::DDS::DDSPixelFormat::rBitMask, and warning().
Referenced by readStandardHeader().


|
private |
Definition at line 54 of file dds.cpp.
References Common::StackException::add(), readData(), and readHeader().
Referenced by DDS().


|
private |
Definition at line 140 of file dds.cpp.
References Graphics::ImageDecoder::_compressed, Graphics::ImageDecoder::_dataType, Graphics::ImageDecoder::_format, Graphics::ImageDecoder::_formatRaw, Graphics::ImageDecoder::_hasAlpha, Graphics::ImageDecoder::_mipMaps, Graphics::hasValidDimensions(), IsPower2, kDataTypeDirect, Graphics::kPixelDataType8, Graphics::kPixelFormatBGR, Graphics::kPixelFormatBGRA, Graphics::kPixelFormatDXT1, Graphics::kPixelFormatDXT5, Common::SeekableReadStream::pos(), Common::ReadStream::readUint32LE(), Common::ScopedPtrBase< T, Deallocator >::release(), Common::SeekableReadStream::seek(), setSize(), Common::SeekableReadStream::size(), and Common::SeekableReadStream::skip().
Referenced by readHeader().


|
private |
Definition at line 217 of file dds.cpp.
References Graphics::ImageDecoder::_mipMaps, kDataType4444, kDataTypeDirect, Common::kReadError, Common::ReadStream::read(), and Common::ReadStream::readUint16LE().
Referenced by load().


|
private |
Definition at line 68 of file dds.cpp.
References kDDSID, readBioWareHeader(), readStandardHeader(), and Common::ReadStream::readUint32BE().
Referenced by load().


|
private |
Definition at line 77 of file dds.cpp.
References Graphics::ImageDecoder::_formatRaw, Graphics::ImageDecoder::_mipMaps, Graphics::DDS::DDSPixelFormat::aBitMask, Graphics::DDS::DDSPixelFormat::bBitMask, Graphics::DDS::DDSPixelFormat::bitCount, detectFormat(), Graphics::DDS::DDSPixelFormat::flags, Graphics::DDS::DDSPixelFormat::fourCC, Graphics::DDS::DDSPixelFormat::gBitMask, Graphics::hasValidDimensions(), Graphics::ImageDecoder::MipMap::height, kHeaderFlagsHasMipMaps, Graphics::DDS::DDSPixelFormat::rBitMask, Common::ReadStream::readUint32BE(), Common::ReadStream::readUint32LE(), setSize(), Graphics::DDS::DDSPixelFormat::size, Common::SeekableReadStream::skip(), and Graphics::ImageDecoder::MipMap::width.
Referenced by readHeader().


|
private |
Definition at line 211 of file dds.cpp.
References Graphics::ImageDecoder::_formatRaw, Graphics::getDataSize(), Graphics::ImageDecoder::MipMap::height, Graphics::ImageDecoder::MipMap::size, and Graphics::ImageDecoder::MipMap::width.
Referenced by readBioWareHeader(), and readStandardHeader().


1.8.14