This is a snapshot of a work-in-progress documentation theme. If you feel lost, miss something, or want to see the original Doxygen docs instead, head over to the archived version of this documentation page.

template<UnsignedInt dimensions>
Magnum::TextureArray class

Texture array.

Template class for one- and two-dimensional texture arrays. See also AbstractTexture documentation for more information.

Usage

See Texture documentation for introduction.

Common usage is to fully configure all texture parameters and then set the data. Example configuration:

Texture2DArray texture;
texture.setMagnificationFilter(Sampler::Filter::Linear)
    .setMinificationFilter(Sampler::Filter::Linear, Sampler::Mipmap::Linear)
    .setWrapping(Sampler::Wrapping::ClampToEdge)
    .setMaxAnisotropy(Sampler::maxMaxAnisotropy());;

It is often more convenient to first allocate the memory for all layers by calling setStorage() and then specify each layer separately using setSubImage():

texture.setStorage(levels, TextureFormat::RGBA8, {64, 64, 16});

for(std::size_t i = 0; i != 16; ++i) {
    Image3D image(PixelFormat::RGBA, PixelType::UnsignedByte, {64, 64, 1}, ...);
    texture.setSubImage(0, Vector3i::zAxis(i), image);
}

In shader, the texture is used via sampler1DArray/sampler2DArray, sampler1DArrayShadow/sampler1DArrayShadow, isampler1DArray/isampler2DArray or usampler1DArray/usampler2DArray. See AbstractShaderProgram documentation for more information about usage in shaders.

Base classes

class AbstractTexture
Base for textures.

Public types

enum (anonymous): UnsignedInt { Dimensions = dimensions }

Public static functions

static auto maxSize() -> VectorTypeFor<dimensions+1, Int>
Max supported texture array size.
static auto compressedBlockSize(TextureFormat format) -> VectorTypeFor<dimensions, Int>
static auto compressedBlockDataSize(TextureFormat format) -> Int
static auto wrap(GLuint id, ObjectFlags flags = {}) -> TextureArray<dimensions>
Wrap existing OpenGL texture array object.

Constructors, destructors, conversion operators

TextureArray() explicit
Constructor.
TextureArray(NoCreateT) explicit noexcept
Construct without creating the underlying OpenGL object.

Public functions

void bindImage(Int imageUnit, Int level, Int layer, ImageAccess access, ImageFormat format)
Bind level of given texture layer to given image unit.
void bindImageLayered(Int imageUnit, Int level, ImageAccess access, ImageFormat format)
Bind level of layered texture to given image unit.
auto setBaseLevel(Int level) -> TextureArray<dimensions>&
auto setMaxLevel(Int level) -> TextureArray<dimensions>&
auto setMinificationFilter(Sampler::Filter filter, Sampler::Mipmap mipmap = Sampler::Mipmap::Base) -> TextureArray<dimensions>&
auto setMagnificationFilter(Sampler::Filter filter) -> TextureArray<dimensions>&
auto setMinLod(Float lod) -> TextureArray<dimensions>&
auto setMaxLod(Float lod) -> TextureArray<dimensions>&
auto setLodBias(Float bias) -> TextureArray<dimensions>&
auto setWrapping(const Array<dimensions, Sampler::Wrapping>& wrapping) -> TextureArray<dimensions>&
auto setBorderColor(const Color4& color) -> TextureArray<dimensions>&
auto setBorderColor(const Vector4ui& color) -> TextureArray<dimensions>&
auto setBorderColor(const Vector4i& color) -> TextureArray<dimensions>&
auto setMaxAnisotropy(Float anisotropy) -> TextureArray<dimensions>&
auto setSRGBDecode(bool decode) -> TextureArray<dimensions>&
template<char r, char g, char b, char a>
auto setSwizzle() -> TextureArray<dimensions>&
auto setCompareMode(Sampler::CompareMode mode) -> TextureArray<dimensions>&
auto setCompareFunction(Sampler::CompareFunction function) -> TextureArray<dimensions>&
auto setDepthStencilMode(Sampler::DepthStencilMode mode) -> TextureArray<dimensions>&
auto setStorage(Int levels, TextureFormat internalFormat, const VectorTypeFor<dimensions+1, Int>& size) -> TextureArray<dimensions>&
auto imageSize(Int level) -> VectorTypeFor<dimensions+1, Int>
void image(Int level, Image<dimensions+1>& image)
auto image(Int level, Image<dimensions+1>&& image) -> Image<dimensions+1>
void image(Int level, BufferImage<dimensions+1>& image, BufferUsage usage)
auto image(Int level, BufferImage<dimensions+1>&& image, BufferUsage usage) -> BufferImage<dimensions+1>
void compressedImage(Int level, CompressedImage<dimensions+1>& image)
auto compressedImage(Int level, CompressedImage<dimensions+1>&& image) -> CompressedImage<dimensions+1>
void compressedImage(Int level, CompressedBufferImage<dimensions+1>& image, BufferUsage usage)
auto compressedImage(Int level, CompressedBufferImage<dimensions+1>&& image, BufferUsage usage) -> CompressedBufferImage<dimensions+1>
void subImage(Int level, const RangeTypeFor<dimensions+1, Int>& range, Image<dimensions+1>& image)
auto subImage(Int level, const RangeTypeFor<dimensions+1, Int>& range, Image<dimensions+1>&& image) -> Image<dimensions+1>
void subImage(Int level, const RangeTypeFor<dimensions+1, Int>& range, BufferImage<dimensions+1>& image, BufferUsage usage)
auto subImage(Int level, const RangeTypeFor<dimensions+1, Int>& range, BufferImage<dimensions+1>&& image, BufferUsage usage) -> BufferImage<dimensions+1>
void compressedSubImage(Int level, const RangeTypeFor<dimensions+1, Int>& range, CompressedImage<dimensions+1>& image)
auto compressedSubImage(Int level, const RangeTypeFor<dimensions+1, Int>& range, CompressedImage<dimensions+1>&& image) -> CompressedImage<dimensions+1>
void compressedSubImage(Int level, const RangeTypeFor<dimensions+1, Int>& range, CompressedBufferImage<dimensions+1>& image, BufferUsage usage)
auto compressedSubImage(Int level, const RangeTypeFor<dimensions+1, Int>& range, CompressedBufferImage<dimensions+1>&& image, BufferUsage usage) -> CompressedBufferImage<dimensions+1>
auto setImage(Int level, TextureFormat internalFormat, const ImageView<dimensions+1>& image) -> TextureArray<dimensions>&
auto setImage(Int level, TextureFormat internalFormat, BufferImage<dimensions+1>& image) -> TextureArray<dimensions>&
auto setImage(Int level, TextureFormat internalFormat, BufferImage<dimensions+1>&& image) -> TextureArray<dimensions>&
auto setCompressedImage(Int level, const CompressedImageView<dimensions+1>& image) -> TextureArray<dimensions>&
auto setCompressedImage(Int level, CompressedBufferImage<dimensions+1>& image) -> TextureArray<dimensions>&
auto setCompressedImage(Int level, CompressedBufferImage<dimensions+1>&& image) -> TextureArray<dimensions>&
auto setSubImage(Int level, const VectorTypeFor<dimensions+1, Int>& offset, const ImageView<dimensions+1>& image) -> TextureArray<dimensions>&
Set image subdata.
auto setSubImage(Int level, const VectorTypeFor<dimensions+1, Int>& offset, BufferImage<dimensions+1>& image) -> TextureArray<dimensions>&
auto setSubImage(Int level, const VectorTypeFor<dimensions+1, Int>& offset, BufferImage<dimensions+1>&& image) -> TextureArray<dimensions>&
auto setCompressedSubImage(Int level, const VectorTypeFor<dimensions+1, Int>& offset, const CompressedImageView<dimensions+1>& image) -> TextureArray<dimensions>&
Set compressed image subdata.
auto setCompressedSubImage(Int level, const VectorTypeFor<dimensions+1, Int>& offset, CompressedBufferImage<dimensions+1>& image) -> TextureArray<dimensions>&
auto setCompressedSubImage(Int level, const VectorTypeFor<dimensions+1, Int>& offset, CompressedBufferImage<dimensions+1>&& image) -> TextureArray<dimensions>&
auto generateMipmap() -> TextureArray<dimensions>&
void invalidateImage(Int level)
void invalidateSubImage(Int level, const VectorTypeFor<dimensions+1, Int>& offset, const VectorTypeFor<dimensions+1, Int>& size)

Enum documentation

template<UnsignedInt dimensions>
enum Magnum::TextureArray<dimensions>::(anonymous): UnsignedInt

Enumerators
Dimensions

Texture dimension count

Function documentation

template<UnsignedInt dimensions>
static VectorTypeFor<dimensions+1, Int> Magnum::TextureArray<dimensions>::maxSize()

Max supported texture array size.

The result is cached, repeated queries don't result in repeated OpenGL calls. If extension EXT_texture_array (part of OpenGL 3.0) is not available, returns zero vector.

template<UnsignedInt dimensions>
static VectorTypeFor<dimensions, Int> Magnum::TextureArray<dimensions>::compressedBlockSize(TextureFormat format)

Compressed block size.

See Texture::compressedBlockSize() for more information.

template<UnsignedInt dimensions>
static Int Magnum::TextureArray<dimensions>::compressedBlockDataSize(TextureFormat format)

Compressed block data size.

See Texture::compressedBlockDataSize() for more information.

template<UnsignedInt dimensions>
static TextureArray<dimensions> Magnum::TextureArray<dimensions>::wrap(GLuint id, ObjectFlags flags = {})

Wrap existing OpenGL texture array object.

Parameters
id OpenGL texture array ID
flags Object creation flags

The id is expected to be of an existing OpenGL texture object with target GL_TEXTURE_1D_ARRAY or GL_TEXTURE_2D_ARRAY based on dimension count. Unlike texture created using constructor, the OpenGL object is by default not deleted on destruction, use flags for different behavior.

template<UnsignedInt dimensions>
Magnum::TextureArray<dimensions>::TextureArray() explicit

Constructor.

Creates new OpenGL texture object. If ARB_direct_state_access (part of OpenGL 4.5) is not available, the texture is created on first use.

template<UnsignedInt dimensions>
Magnum::TextureArray<dimensions>::TextureArray(NoCreateT) explicit noexcept

Construct without creating the underlying OpenGL object.

The constructed instance is equivalent to moved-from state. Useful in cases where you will overwrite the instance later anyway. Move another object over it to make it useful.

This function can be safely used for constructing (and later destructing) objects even without any OpenGL context being active.

template<UnsignedInt dimensions>
void Magnum::TextureArray<dimensions>::bindImage(Int imageUnit, Int level, Int layer, ImageAccess access, ImageFormat format)

Bind level of given texture layer to given image unit.

Parameters
imageUnit Image unit
level Texture level
layer Texture layer
access Image access
format Image format

template<UnsignedInt dimensions>
void Magnum::TextureArray<dimensions>::bindImageLayered(Int imageUnit, Int level, ImageAccess access, ImageFormat format)

Bind level of layered texture to given image unit.

Parameters
imageUnit Image unit
level Texture level
access Image access
format Image format

template<UnsignedInt dimensions>
TextureArray<dimensions>& Magnum::TextureArray<dimensions>::setBaseLevel(Int level)

Returns Reference to self (for method chaining)

Set base mip level. See Texture::setBaseLevel() for more information.

template<UnsignedInt dimensions>
TextureArray<dimensions>& Magnum::TextureArray<dimensions>::setMaxLevel(Int level)

Returns Reference to self (for method chaining)

Set max mip level. See Texture::setMaxLevel() for more information.

template<UnsignedInt dimensions>
TextureArray<dimensions>& Magnum::TextureArray<dimensions>::setMinificationFilter(Sampler::Filter filter, Sampler::Mipmap mipmap = Sampler::Mipmap::Base)

Returns Reference to self (for method chaining)

Set minification filter. See Texture::setMinificationFilter() for more information.

template<UnsignedInt dimensions>
TextureArray<dimensions>& Magnum::TextureArray<dimensions>::setMagnificationFilter(Sampler::Filter filter)

Returns Reference to self (for method chaining)

Set magnification filter. See Texture::setMagnificationFilter() for more information.

template<UnsignedInt dimensions>
TextureArray<dimensions>& Magnum::TextureArray<dimensions>::setMinLod(Float lod)

Returns Reference to self (for method chaining)

Set minimum level-of-detail parameter. See Texture::setMinLod() for more information.

template<UnsignedInt dimensions>
TextureArray<dimensions>& Magnum::TextureArray<dimensions>::setMaxLod(Float lod)

Returns Reference to self (for method chaining)

Set maximum level-of-detail parameter. See Texture::setMaxLod() for more information.

template<UnsignedInt dimensions>
TextureArray<dimensions>& Magnum::TextureArray<dimensions>::setLodBias(Float bias)

Returns Reference to self (for method chaining)

Set level-of-detail bias. See Texture::setLodBias() for more information.

template<UnsignedInt dimensions>
TextureArray<dimensions>& Magnum::TextureArray<dimensions>::setWrapping(const Array<dimensions, Sampler::Wrapping>& wrapping)

Returns Reference to self (for method chaining)

Set wrapping. See Texture::setWrapping() for more information.

template<UnsignedInt dimensions>
TextureArray<dimensions>& Magnum::TextureArray<dimensions>::setBorderColor(const Color4& color)

Returns Reference to self (for method chaining)

Set border color. See Texture::setBorderColor(const Color4&) for more information.

template<UnsignedInt dimensions>
TextureArray<dimensions>& Magnum::TextureArray<dimensions>::setBorderColor(const Vector4ui& color)

Returns Reference to self (for method chaining)

Set border color for integer texture. See Texture::setBorderColor(const Vector4ui&) for more information.

template<UnsignedInt dimensions>
TextureArray<dimensions>& Magnum::TextureArray<dimensions>::setBorderColor(const Vector4i& color)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

template<UnsignedInt dimensions>
TextureArray<dimensions>& Magnum::TextureArray<dimensions>::setMaxAnisotropy(Float anisotropy)

Returns Reference to self (for method chaining)

Set max anisotropy. See Texture::setMaxAnisotropy() for more information.

template<UnsignedInt dimensions>
TextureArray<dimensions>& Magnum::TextureArray<dimensions>::setSRGBDecode(bool decode)

Returns Reference to self (for method chaining)

Set sRGB decoding. See Texture::setSRGBDecode() for more information.

template<UnsignedInt dimensions> template<char r, char g, char b, char a>
TextureArray<dimensions>& Magnum::TextureArray<dimensions>::setSwizzle()

Returns Reference to self (for method chaining)

Set component swizzle. See Texture::setSwizzle() for more information.

template<UnsignedInt dimensions>
TextureArray<dimensions>& Magnum::TextureArray<dimensions>::setCompareMode(Sampler::CompareMode mode)

Returns Reference to self (for method chaining)

Set depth texture comparison mode. See Texture::setCompareMode() for more information.

template<UnsignedInt dimensions>
TextureArray<dimensions>& Magnum::TextureArray<dimensions>::setCompareFunction(Sampler::CompareFunction function)

Returns Reference to self (for method chaining)

Set depth texture comparison function. See Texture::setCompareFunction() for more information.

template<UnsignedInt dimensions>
TextureArray<dimensions>& Magnum::TextureArray<dimensions>::setDepthStencilMode(Sampler::DepthStencilMode mode)

Returns Reference to self (for method chaining)

Set depth/stencil texture mode. See Texture::setDepthStencilMode() for more information.

template<UnsignedInt dimensions>
TextureArray<dimensions>& Magnum::TextureArray<dimensions>::setStorage(Int levels, TextureFormat internalFormat, const VectorTypeFor<dimensions+1, Int>& size)

Returns Reference to self (for method chaining)

Set storage. See Texture::setStorage() for more information.

template<UnsignedInt dimensions>
VectorTypeFor<dimensions+1, Int> Magnum::TextureArray<dimensions>::imageSize(Int level)

Image size in given mip level.

See Texture::imageSize() for more information.

template<UnsignedInt dimensions>
void Magnum::TextureArray<dimensions>::image(Int level, Image<dimensions+1>& image)

Read given mip level of texture to image.

See Texture::image(Int, Image&) for more information.

template<UnsignedInt dimensions>
Image<dimensions+1> Magnum::TextureArray<dimensions>::image(Int level, Image<dimensions+1>&& image)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Convenience alternative to the above, example usage: Image3D image = texture.image(0, {PixelFormat::RGBA, PixelType::UnsignedByte});

template<UnsignedInt dimensions>
void Magnum::TextureArray<dimensions>::image(Int level, BufferImage<dimensions+1>& image, BufferUsage usage)

Read given mip level of texture to buffer image.

See Texture::image(Int, BufferImage&, BufferUsage) for more information.

template<UnsignedInt dimensions>
BufferImage<dimensions+1> Magnum::TextureArray<dimensions>::image(Int level, BufferImage<dimensions+1>&& image, BufferUsage usage)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Convenience alternative to the above, example usage: BufferImage3D image = texture.image(0, {PixelFormat::RGBA, PixelType::UnsignedByte}, BufferUsage::StaticRead);

template<UnsignedInt dimensions>
void Magnum::TextureArray<dimensions>::compressedImage(Int level, CompressedImage<dimensions+1>& image)

Read given mip level of compressed texture to image.

See Texture::compressedImage(Int, CompressedImage&) for more information.

template<UnsignedInt dimensions>
CompressedImage<dimensions+1> Magnum::TextureArray<dimensions>::compressedImage(Int level, CompressedImage<dimensions+1>&& image)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Convenience alternative to the above, example usage: CompressedImage3D image = texture.compressedImage(0, {});

template<UnsignedInt dimensions>
void Magnum::TextureArray<dimensions>::compressedImage(Int level, CompressedBufferImage<dimensions+1>& image, BufferUsage usage)

Read given mip level of compressed texture to buffer image.

See Texture::compressedImage(Int, CompressedBufferImage&, BufferUsage) for more information.

template<UnsignedInt dimensions>
CompressedBufferImage<dimensions+1> Magnum::TextureArray<dimensions>::compressedImage(Int level, CompressedBufferImage<dimensions+1>&& image, BufferUsage usage)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Convenience alternative to the above, example usage: CompressedBufferImage3D image = texture.compressedImage(0, {}, BufferUsage::StaticRead);

template<UnsignedInt dimensions>
void Magnum::TextureArray<dimensions>::subImage(Int level, const RangeTypeFor<dimensions+1, Int>& range, Image<dimensions+1>& image)

Read range of given texture mip level to image.

See Texture::subImage(Int, const RangeTypeFor<dimensions, Int>&, Image&) for more information.

template<UnsignedInt dimensions>
Image<dimensions+1> Magnum::TextureArray<dimensions>::subImage(Int level, const RangeTypeFor<dimensions+1, Int>& range, Image<dimensions+1>&& image)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Convenience alternative to the above, example usage: Image3D image = texture.subImage(0, range, {PixelFormat::RGBA, PixelType::UnsignedByte});

template<UnsignedInt dimensions>
void Magnum::TextureArray<dimensions>::subImage(Int level, const RangeTypeFor<dimensions+1, Int>& range, BufferImage<dimensions+1>& image, BufferUsage usage)

Read range of given texture mip level to buffer image.

See Texture::subImage(Int, const RangeTypeFor<dimensions, Int>&, BufferImage&, BufferUsage) for more information.

template<UnsignedInt dimensions>
BufferImage<dimensions+1> Magnum::TextureArray<dimensions>::subImage(Int level, const RangeTypeFor<dimensions+1, Int>& range, BufferImage<dimensions+1>&& image, BufferUsage usage)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Convenience alternative to the above, example usage: BufferImage3D image = texture.subImage(0, range, {PixelFormat::RGBA, PixelType::UnsignedByte}, BufferUsage::StaticRead);

template<UnsignedInt dimensions>
void Magnum::TextureArray<dimensions>::compressedSubImage(Int level, const RangeTypeFor<dimensions+1, Int>& range, CompressedImage<dimensions+1>& image)

Read range of given compressed texture mip level to image.

See Texture::compressedSubImage(Int, const RangeTypeFor<dimensions, Int>&, CompressedImage&) for more information.

template<UnsignedInt dimensions>
CompressedImage<dimensions+1> Magnum::TextureArray<dimensions>::compressedSubImage(Int level, const RangeTypeFor<dimensions+1, Int>& range, CompressedImage<dimensions+1>&& image)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Convenience alternative to the above, example usage: CompressedImage3D image = texture.compressedSubImage(0, range, {});

template<UnsignedInt dimensions>
void Magnum::TextureArray<dimensions>::compressedSubImage(Int level, const RangeTypeFor<dimensions+1, Int>& range, CompressedBufferImage<dimensions+1>& image, BufferUsage usage)

Read range of given compressed texture mip level to buffer image.

See Texture::compressedSubImage(Int, const RangeTypeFor<dimensions, Int>&, CompressedBufferImage&, BufferUsage) for more information.

template<UnsignedInt dimensions>
CompressedBufferImage<dimensions+1> Magnum::TextureArray<dimensions>::compressedSubImage(Int level, const RangeTypeFor<dimensions+1, Int>& range, CompressedBufferImage<dimensions+1>&& image, BufferUsage usage)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Convenience alternative to the above, example usage: CompressedBufferImage3D image = texture.compressedSubImage(0, range, {}, BufferUsage::StaticRead);

template<UnsignedInt dimensions>
TextureArray<dimensions>& Magnum::TextureArray<dimensions>::setImage(Int level, TextureFormat internalFormat, const ImageView<dimensions+1>& image)

Returns Reference to self (for method chaining)

Set image data. See Texture::setImage() for more information.

template<UnsignedInt dimensions>
TextureArray<dimensions>& Magnum::TextureArray<dimensions>::setImage(Int level, TextureFormat internalFormat, BufferImage<dimensions+1>& image)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

template<UnsignedInt dimensions>
TextureArray<dimensions>& Magnum::TextureArray<dimensions>::setImage(Int level, TextureFormat internalFormat, BufferImage<dimensions+1>&& image)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

template<UnsignedInt dimensions>
TextureArray<dimensions>& Magnum::TextureArray<dimensions>::setCompressedImage(Int level, const CompressedImageView<dimensions+1>& image)

Returns Reference to self (for method chaining)

Set compressed image data. See Texture::setCompressedImage() for more information.

template<UnsignedInt dimensions>
TextureArray<dimensions>& Magnum::TextureArray<dimensions>::setCompressedImage(Int level, CompressedBufferImage<dimensions+1>& image)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

template<UnsignedInt dimensions>
TextureArray<dimensions>& Magnum::TextureArray<dimensions>::setCompressedImage(Int level, CompressedBufferImage<dimensions+1>&& image)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

template<UnsignedInt dimensions>
TextureArray<dimensions>& Magnum::TextureArray<dimensions>::setSubImage(Int level, const VectorTypeFor<dimensions+1, Int>& offset, const ImageView<dimensions+1>& image)

Set image subdata.

Parameters
level Mip level
offset Offset where to put data in the texture
image Image, ImageView or Trade::ImageData of the same dimension count
Returns Reference to self (for method chaining)

If neither ARB_direct_state_access (part of OpenGL 4.5) nor EXT_direct_state_access desktop extension is available, the texture is bound before the operation (if not already).

template<UnsignedInt dimensions>
TextureArray<dimensions>& Magnum::TextureArray<dimensions>::setSubImage(Int level, const VectorTypeFor<dimensions+1, Int>& offset, BufferImage<dimensions+1>& image)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

template<UnsignedInt dimensions>
TextureArray<dimensions>& Magnum::TextureArray<dimensions>::setSubImage(Int level, const VectorTypeFor<dimensions+1, Int>& offset, BufferImage<dimensions+1>&& image)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

template<UnsignedInt dimensions>
TextureArray<dimensions>& Magnum::TextureArray<dimensions>::setCompressedSubImage(Int level, const VectorTypeFor<dimensions+1, Int>& offset, const CompressedImageView<dimensions+1>& image)

Set compressed image subdata.

Parameters
level Mip level
offset Offset where to put data in the texture
image CompressedImage, CompressedImageView or compressed Trade::ImageData of the same dimension count
Returns Reference to self (for method chaining)

If neither ARB_direct_state_access (part of OpenGL 4.5) nor EXT_direct_state_access desktop extension is available, the texture is bound before the operation (if not already).

template<UnsignedInt dimensions>
TextureArray<dimensions>& Magnum::TextureArray<dimensions>::setCompressedSubImage(Int level, const VectorTypeFor<dimensions+1, Int>& offset, CompressedBufferImage<dimensions+1>& image)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

template<UnsignedInt dimensions>
TextureArray<dimensions>& Magnum::TextureArray<dimensions>::setCompressedSubImage(Int level, const VectorTypeFor<dimensions+1, Int>& offset, CompressedBufferImage<dimensions+1>&& image)

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

template<UnsignedInt dimensions>
TextureArray<dimensions>& Magnum::TextureArray<dimensions>::generateMipmap()

Returns Reference to self (for method chaining)

Generate mipmap. See Texture::generateMipmap() for more information.

template<UnsignedInt dimensions>
void Magnum::TextureArray<dimensions>::invalidateImage(Int level)

Invalidate texture image.

See Texture::invalidateImage() for more information.

template<UnsignedInt dimensions>
void Magnum::TextureArray<dimensions>::invalidateSubImage(Int level, const VectorTypeFor<dimensions+1, Int>& offset, const VectorTypeFor<dimensions+1, Int>& size)

Invalidate texture subimage.

See Texture::invalidateSubImage() for more information.