Go to the documentation of this file.
28 #ifndef __OgreDDSCodec_H__
29 #define __OgreDDSCodec_H__
41 struct DXTColourBlock;
42 struct DXTExplicitAlphaBlock;
43 struct DXTInterpolatedAlphaBlock;
55 void flipEndian(
void * pData,
size_t size,
size_t count)
const;
Codec specialized in loading DDS (Direct Draw Surface) images.
virtual String getType() const
Returns the type of the codec as a String.
DecodeResult decode(DataStreamPtr &input) const
Codes the data from the input chunk into the output chunk.
void flipEndian(void *pData, size_t size) const
Codec specialized in images.
void unpackDXTAlpha(const DXTExplicitAlphaBlock &block, ColourValue *pCol) const
Unpack DXT alphas into array of 16 colour values.
PixelFormat convertDXToOgreFormat(uint32 fourcc) const
void unpackDXTAlpha(const DXTInterpolatedAlphaBlock &block, ColourValue *pCol) const
Unpack DXT alphas into array of 16 colour values.
DataStreamPtr encode(MemoryDataStreamPtr &input, CodecDataPtr &pData) const
Codes the data in the input stream and saves the result in the output stream.
void unpackDXTColour(PixelFormat pf, const DXTColourBlock &block, ColourValue *pCol) const
Unpack DXT colours into array of 16 colour values.
PixelFormat
The pixel format used for images, textures, and render surfaces.
static void shutdown(void)
Static method to shutdown and unregister the DDS codec.
static DDSCodec * msInstance
Single registered codec instance.
PixelFormat convertFourCCFormat(uint32 fourcc) const
String magicNumberToFileExt(const char *magicNumberPtr, size_t maxbytes) const
Maps a magic number header to a file extension, if this codec recognises it.
void encodeToFile(MemoryDataStreamPtr &input, const String &outFileName, CodecDataPtr &pData) const
Codes the data in the input chunk and saves the result in the output filename provided.
void flipEndian(void *pData, size_t size, size_t count) const
Class representing colour.
std::pair< MemoryDataStreamPtr, CodecDataPtr > DecodeResult
Result of a decoding; both a decoded data stream and CodecData metadata.
static void startup(void)
Static method to startup and register the DDS codec.
PixelFormat convertPixelFormat(uint32 rgbBits, uint32 rMask, uint32 gMask, uint32 bMask, uint32 aMask) const
Copyright © 2012 Torus Knot Software Ltd

This work is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.