Class for decoding a DDS raster image. More...
#include <Inventor/image/SoDDSImageRW.h>
Public Member Functions | |
virtual SoType | getTypeId () const |
SoDDSImageRW () | |
virtual | ~SoDDSImageRW () |
virtual SbBool | open (SoRasterImageIO *rasterImageIO, OpenMode openMode) |
virtual SbBool | write (SbRasterImage *rasterImage, unsigned int xPos=0, unsigned int yPos=0) |
virtual SbBool | read (SbRasterImage *rasterImage, SbBool infoOnly=FALSE) |
virtual SbBool | isMultipleBufferInverted () const |
virtual SoRasterImageRW::WriteCapability | getWriteCapability () const |
virtual SoRasterImageRW::ReadCapability | getReadCapability () const |
Static Public Member Functions | |
static SoType | getClassTypeId () |
This class is used for decoding a DDS (DirectDraw Surface) raster image.
DDS files are faster to load and use less memory than other image file formats, because the compressed data is sent directly to the graphics device (no decompression is done on the CPU).
Formats:
This class is able to read DDS files compressed with DXT1 with 1-bit Alpha, DXT3, and DXT5 compression. The other formats which can be contained by a DDS file (e.g. DXT2 and DXT4) are not currently supported.
Mipmaps:
This format can also embed mipmaps (levels of resolution), but all levels (from higher resolution to a 1*1 pixel image) are not necessarily required. The SoComplexity::textureQuality field has no effect on mipmap generation if the DDS file already embeds mipmaps.
NOTE: File encoding and writing is not currently supported.
See SoRasterImageRW for more information and code examples.
SoRasterImageFile, SoRasterImageRW, SbRasterImage, SoComplexity
SoDDSImageRW::SoDDSImageRW | ( | ) |
Constructor.
virtual SoDDSImageRW::~SoDDSImageRW | ( | ) | [virtual] |
Destructor.
static SoType SoDDSImageRW::getClassTypeId | ( | ) | [static] |
Returns the type identifier for this class.
Reimplemented from SoRasterImageRW.
virtual SoRasterImageRW::ReadCapability SoDDSImageRW::getReadCapability | ( | ) | const [virtual] |
Returns the read capability of the raster format.
Reimplemented from SoRasterImageRW.
virtual SoType SoDDSImageRW::getTypeId | ( | ) | const [virtual] |
Returns the type identifier for this specific instance.
Implements SoRasterImageRW.
virtual SoRasterImageRW::WriteCapability SoDDSImageRW::getWriteCapability | ( | ) | const [virtual] |
Returns the write capability of the raster format.
Reimplemented from SoRasterImageRW.
virtual SbBool SoDDSImageRW::isMultipleBufferInverted | ( | ) | const [virtual] |
Specifies the write direction when using multiple buffers.
Returns FALSE if buffers are written from top to bottom. Returns TRUE if buffers are written from bottom to top.
Reimplemented from SoRasterImageRW.
virtual SbBool SoDDSImageRW::open | ( | SoRasterImageIO * | rasterImageIO, | |
OpenMode | openMode | |||
) | [virtual] |
Opens the reader/writer in the specified open mode.
Reimplemented from SoRasterImageRW.
virtual SbBool SoDDSImageRW::read | ( | SbRasterImage * | rasterImage, | |
SbBool | infoOnly = FALSE | |||
) | [virtual] |
Reads, decodes, and fills the rasterImage object.
If infoOnly is TRUE, then the buffer will not be read, the parameter rasterImage will be set with raster size and raster number of components, the buffer will be NULL.
Implements SoRasterImageRW.
virtual SbBool SoDDSImageRW::write | ( | SbRasterImage * | rasterImage, | |
unsigned int | xPos = 0 , |
|||
unsigned int | yPos = 0 | |||
) | [virtual] |
Writes and encodes the given data in the specific format.
Not currently supported for this format.
Implements SoRasterImageRW.