Magnum::Trade::TextureData class

Texture data.

Public types

enum class Type: UnsignedByte { Texture1D, Texture2D, Texture3D, Cube }
Texture type.

Constructors, destructors, conversion operators

TextureData(Type type, Sampler::Filter minificationFilter, Sampler::Filter magnificationFilter, Sampler::Mipmap mipmapFilter, Array3D<Sampler::Wrapping> wrapping, UnsignedInt image, const void* importerState = nullptr) noexcept
Constructor.
TextureData(const TextureData&) deleted
Copying is not allowed.
TextureData(TextureData&&) noexcept defaulted
Move constructor.

Public functions

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

Enum documentation

enum class Magnum::Trade::TextureData::Type: UnsignedByte

Texture type.

Enumerators
Texture1D

One-dimensional texture

Texture2D

Two-dimensional texture

Texture3D

Three-dimensional texture

Cube

Cube map texture

Function documentation

Magnum::Trade::TextureData::TextureData(Type type, Sampler::Filter minificationFilter, Sampler::Filter magnificationFilter, Sampler::Mipmap mipmapFilter, Array3D<Sampler::Wrapping> wrapping, UnsignedInt image, const void* importerState = nullptr) 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

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

Image ID.

ID of 1D, 2D or 3D image based on texture type. If type is Type::Cube the function returns first of six consecutive IDs of cube map sides, ordered +X, -X, +Y, -Y, +Z, -Z.

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

Importer-specific state.

See AbstractImporter::importerState() for more information.

Debug& operator<<(Debug& debug, TextureData::Type value)

Debug output operator.