Magnum::Trade::TextureData class

Texture data.

Provides access to texture metadata such as sampler properties and association with a concrete image. Populated instances of this class are returned from AbstractImporter::texture() and can be passed to AbstractSceneConverter::add(const TextureData&, Containers::StringView). Similarly to other Trade types, the internal representation is fixed upon construction and doesn't allow any modification afterwards.

Public types

using Type = TextureType deprecated in Git master
Texture type.

Constructors, destructors, conversion operators

TextureData(TextureType type, SamplerFilter minificationFilter, SamplerFilter magnificationFilter, SamplerMipmap mipmapFilter, const Math::Vector3<SamplerWrapping>& wrapping, UnsignedInt image, const void* importerState = nullptr) explicit noexcept
Constructor.
TextureData(TextureType type, SamplerFilter minificationFilter, SamplerFilter magnificationFilter, SamplerMipmap mipmapFilter, SamplerWrapping wrapping, UnsignedInt image, const void* importerState = nullptr) explicit noexcept
Construct with the same wrapping for all dimensions.
TextureData(const TextureData&) deleted
Copying is not allowed.
TextureData(TextureData&&) defaulted noexcept
Move constructor.

Public functions

auto operator=(const TextureData&) -> TextureData& deleted
Copying is not allowed.
auto operator=(TextureData&&) -> TextureData& defaulted noexcept
Move assignment.
auto type() const -> TextureType
Texture type.
auto minificationFilter() const -> SamplerFilter
Minification filter.
auto magnificationFilter() const -> SamplerFilter
Magnification filter.
auto mipmapFilter() const -> SamplerMipmap
Mipmap filter.
auto wrapping() const -> Math::Vector3<SamplerWrapping>
Wrapping.
auto image() const -> UnsignedInt
Image ID.
auto importerState() const -> const void*
Importer-specific state.

Typedef documentation

typedef TextureType Magnum::Trade::TextureData::Type

Texture type.

Function documentation

Magnum::Trade::TextureData::TextureData(TextureType type, SamplerFilter minificationFilter, SamplerFilter magnificationFilter, SamplerMipmap mipmapFilter, const Math::Vector3<SamplerWrapping>& wrapping, UnsignedInt image, const void* importerState = nullptr) explicit noexcept

Constructor.

Parameters
type Texture type
minificationFilter Minification filter
magnificationFilter Magnification filter
mipmapFilter Mipmap filter
wrapping Wrapping
image Texture image ID
importerState Importer-specific state

Magnum::Trade::TextureData::TextureData(TextureType type, SamplerFilter minificationFilter, SamplerFilter magnificationFilter, SamplerMipmap mipmapFilter, SamplerWrapping wrapping, UnsignedInt image, const void* importerState = nullptr) explicit noexcept

Construct with the same wrapping for all dimensions.

Same as calling TextureData(TextureType, SamplerFilter, SamplerFilter, SamplerMipmap, const Math::Vector3<SamplerWrapping>&, UnsignedInt, const void*) with the same wrapping value for all dimensions.

UnsignedInt Magnum::Trade::TextureData::image() const

Image ID.

ID of a 1D, 2D or 3D image depending on type().

const void* Magnum::Trade::TextureData::importerState() const

Importer-specific state.

See AbstractImporter::importerState() for more information.