DdsImporter class
DDS image importer plugin.
Contents
Supports DirectDraw Surface images (*.dds) in the following formats:
- DDS uncompressed RGB, RGBA, BGR, BGRA, grayscale as PixelFormat::
RGB8Unorm, PixelFormat:: RGBA8Unorm or PixelFormat:: R8Unorm, with component swizzling as necessary - DDS compressed DXT1, DXT3, DXT5 as CompressedPixelFormat::
Bc1RGBAUnorm, CompressedPixelFormat:: Bc2RGBAUnorm and CompressedPixelFormat:: Bc3RGBAUnorm, respectively - DDS DXT10 with the following DXGI formats:
R8_TYPELESS,R8G8_TYPELESS,R8G8B8A8_TYPELESSas PixelFormat::R8UI and its two-/four-component equivalents (no special handling) R8_UINT,R8G8_UINT,R8G8B8A8_UINTas PixelFormat::R8UI and its two-/four-component equivalents R8_INT,R8G8_INT,R8G8B8A8_INTas PixelFormat::R8I and its two-/four-component equivalents R8_UNORM,R8G8_UNORM,R8G8B8A8_UNORMas PixelFormat::R8Unorm and its two-/four-component equivalents A8_UNORMas PixelFormat::R8Unorm (no special handling) R8G8B8A8_UNORM_SRGBas PixelFormat::RGBA8Unorm (no special handling) R8_SNORM,R8G8_SNORM,R8G8B8A8_SNORMas PixelFormat::R8Snorm and its two-/four-component equivalents R16_TYPELESS,R16G16_TYPELESS,R16G16B16A16_TYPELESSas PixelFormat::R16UI and its two-/four-component equivalents (no special handling) R16_UINT,R16G16_UINT,R16G16B16A16_UINTas PixelFormat::R16UI and its two-/four-component equivalents R16_INT,R16G16_INT,R16G16B16A16_INTas PixelFormat::R16I and its two-/four-component equivalents R16_FLOAT,R16G16_FLOAT,R16G16B16A16_FLOATas PixelFormat::R16F and its two-/four-component equivalents R16_UNORM,R16G16_UNORM,R16G16B16A16_UNORMas PixelFormat::R16Unorm and its two-/four-component equivalents R16_SNORM,R16G16_SNORM,R16G16B16A16_SNORMas PixelFormat::R16Snorm and its two-/four-component equivalents R32_TYPELESS,R32G32_TYPELESS,R32G32B32_TYPELESS,R32G32B32A32_TYPELESSas PixelFormat::R32UI and its two-/three-/four-component equivalents (no special handling) R32_UINT,R32G32_UINT,R32G32B32_UINT,R32G32B32A32_UINTas PixelFormat::R32UI and its two-/three-/four-component equivalents R32_INT,R32G32_INT,R32G32B32_INT,R32G32B32A32_INTas PixelFormat::R32I and its two-/three-/four-component equivalents R32_FLOAT,R32G32_FLOAT,R32G32B32_FLOAT,R32G32B32A32_FLOATas PixelFormat::R32F and its two-/three-/four-component equivalents
This plugin depends on the Trade library and is built if WITH_DDSIMPORTER is enabled when building Magnum Plugins. To use as a dynamic plugin, you need to load the "DdsImporter" plugin from MAGNUM_PLUGINS_IMPORTER_DIR. To use as a static plugin or as a dependency of another plugin with CMake, you need to request the DdsImporter component of the MagnumPlugins package in CMake and link to the MagnumPlugins::DdsImporter target. See Downloading and building plugins, Plugin usage with CMake and Loading and using plugins for more information.
Note: Mipmaps are currently imported under separate image data ids. You may access them via image2D(UnsignedInt)/image3D(UnsignedInt) which will return the n-th mip, a bigger n indicating a smaller mip.
Base classes
- class AbstractImporter
- Base for importer plugins.
Constructors, destructors, conversion operators
- DdsImporter() explicit
- Default constructor.
-
DdsImporter(PluginManager::
AbstractManager& manager, const std:: string& plugin) explicit - Plugin manager constructor.
Private functions
- auto doFeatures() const override -> Features virtual
- Implementation for features()
- auto doIsOpened() const override -> bool virtual
- Implementation for isOpened()
- void doClose() override virtual
- Implementation for close()
-
void doOpenData(Containers::
ArrayView<const char> data) override virtual - Implementation for openData()
- auto doImage2DCount() const override -> UnsignedInt virtual
- Implementation for image2DCount()
-
auto doImage2D(UnsignedInt id) override -> Containers::
Optional<ImageData2D> virtual - Implementation for image2D()
- auto doImage3DCount() const override -> UnsignedInt virtual
- Implementation for image3DCount()
-
auto doImage3D(UnsignedInt id) override -> Containers::
Optional<ImageData3D> virtual - Implementation for image3D()
Function documentation
UnsignedInt Magnum:: Trade:: DdsImporter:: doImage2DCount() const override virtual private
Implementation for image2DCount()
Default implementation returns 0.
UnsignedInt Magnum:: Trade:: DdsImporter:: doImage3DCount() const override virtual private
Implementation for image3DCount()
Default implementation returns 0.