template<UnsignedInt dimensions>
Magnum::GL::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:

GL::Texture2DArray texture;
texture.setMagnificationFilter(GL::SamplerFilter::Linear)
    .setMinificationFilter(GL::SamplerFilter::Linear, GL::SamplerMipmap::Linear)
    .setWrapping(GL::SamplerWrapping::ClampToEdge)
    .setMaxAnisotropy(GL::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, GL::TextureFormat::RGBA8, {64, 64, 16});

for(std::size_t i = 0; i != 16; ++i) {
    ImageView3D image(PixelFormat::RGBA8Unorm, {64, 64, 1}, data);
    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>
Compressed block size.
static auto compressedBlockDataSize(TextureFormat format) -> Int
Compressed block data size.
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>&
Set base mip level.
auto setMaxLevel(Int level) -> TextureArray<dimensions>&
Set max mip level.
auto setMinificationFilter(SamplerFilter filter, SamplerMipmap mipmap = SamplerMipmap::Base) -> TextureArray<dimensions>&
Set minification filter.
auto setMinificationFilter(Magnum::SamplerFilter filter, Magnum::SamplerMipmap mipmap = Magnum::SamplerMipmap::Base) -> TextureArray<dimensions>&
auto setMagnificationFilter(SamplerFilter filter) -> TextureArray<dimensions>&
Set magnification filter.
auto setMagnificationFilter(Magnum::SamplerFilter filter) -> TextureArray<dimensions>&
auto setMinLod(Float lod) -> TextureArray<dimensions>&
Set minimum level-of-detail parameter.
auto setMaxLod(Float lod) -> TextureArray<dimensions>&
Set maximum level-of-detail parameter.
auto setLodBias(Float bias) -> TextureArray<dimensions>&
Set level-of-detail bias.
auto setWrapping(const Array<dimensions, SamplerWrapping>& wrapping) -> TextureArray<dimensions>&
Set wrapping.
auto setWrapping(const Array<dimensions, Magnum::SamplerWrapping>& wrapping) -> TextureArray<dimensions>&
auto setBorderColor(const Color4& color) -> TextureArray<dimensions>&
Set border color.
auto setBorderColor(const Vector4ui& color) -> TextureArray<dimensions>&
Set border color for integer texture.
auto setBorderColor(const Vector4i& color) -> TextureArray<dimensions>&
auto setMaxAnisotropy(Float anisotropy) -> TextureArray<dimensions>&
Set max anisotropy.
auto setSRGBDecode(bool decode) -> TextureArray<dimensions>&
Set sRGB decoding.
template<char r, char g, char b, char a>
auto setSwizzle() -> TextureArray<dimensions>&
Set component swizzle.
auto setCompareMode(SamplerCompareMode mode) -> TextureArray<dimensions>&
Set depth texture comparison mode.
auto setCompareFunction(SamplerCompareFunction function) -> TextureArray<dimensions>&
Set depth texture comparison function.
auto setDepthStencilMode(SamplerDepthStencilMode mode) -> TextureArray<dimensions>&
Set depth/stencil texture mode.
auto setStorage(Int levels, TextureFormat internalFormat, const VectorTypeFor<dimensions+1, Int>& size) -> TextureArray<dimensions>&
Set storage.
auto imageSize(Int level) -> VectorTypeFor<dimensions+1, Int>
Image size in given mip level.
void image(Int level, Image<dimensions+1>& image)
Read given mip level of texture to image.
auto image(Int level, Image<dimensions+1>&& image) -> Image<dimensions+1>
void image(Int level, BufferImage<dimensions+1>& image, BufferUsage usage)
Read given mip level of texture to buffer image.
auto image(Int level, BufferImage<dimensions+1>&& image, BufferUsage usage) -> BufferImage<dimensions+1>
void compressedImage(Int level, CompressedImage<dimensions+1>& image)
Read given mip level of compressed texture to image.
auto compressedImage(Int level, CompressedImage<dimensions+1>&& image) -> CompressedImage<dimensions+1>
void compressedImage(Int level, CompressedBufferImage<dimensions+1>& image, BufferUsage usage)
Read given mip level of compressed texture to buffer image.
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)
Read range of given texture mip level to 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)
Read range of given texture mip level to buffer image.
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)
Read range of given compressed texture mip level to 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)
Read range of given compressed texture mip level to buffer image.
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>&
Set image data.
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>&
Set compressed image data.
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>&
Generate mipmap.
void invalidateImage(Int level)
Invalidate texture image.
void invalidateSubImage(Int level, const VectorTypeFor<dimensions+1, Int>& offset, const VectorTypeFor<dimensions+1, Int>& size)
Invalidate texture subimage.

Enum documentation

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

Enumerators
Dimensions

Texture dimension count

Function documentation

template<UnsignedInt dimensions>
static VectorTypeFor<dimensions+1, Int> Magnum::GL::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::GL::TextureArray<dimensions>::compressedBlockSize(TextureFormat format)

Compressed block size.

See Texture::compressedBlockSize() for more information.

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

Compressed block data size.

See Texture::compressedBlockDataSize() for more information.

template<UnsignedInt dimensions>
static TextureArray<dimensions> Magnum::GL::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::GL::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::GL::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::GL::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::GL::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::GL::TextureArray<dimensions>::setBaseLevel(Int level)

Set base mip level.

Returns Reference to self (for method chaining)

See Texture::setBaseLevel() for more information.

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

Set max mip level.

Returns Reference to self (for method chaining)

See Texture::setMaxLevel() for more information.

template<UnsignedInt dimensions>
TextureArray<dimensions>& Magnum::GL::TextureArray<dimensions>::setMinificationFilter(SamplerFilter filter, SamplerMipmap mipmap = SamplerMipmap::Base)

Set minification filter.

Returns Reference to self (for method chaining)

See Texture::setMinificationFilter() for more information.

template<UnsignedInt dimensions>
TextureArray<dimensions>& Magnum::GL::TextureArray<dimensions>::setMinificationFilter(Magnum::SamplerFilter filter, Magnum::SamplerMipmap mipmap = Magnum::SamplerMipmap::Base)

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::GL::TextureArray<dimensions>::setMagnificationFilter(SamplerFilter filter)

Set magnification filter.

Returns Reference to self (for method chaining)

See Texture::setMagnificationFilter() for more information.

template<UnsignedInt dimensions>
TextureArray<dimensions>& Magnum::GL::TextureArray<dimensions>::setMagnificationFilter(Magnum::SamplerFilter filter)

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::GL::TextureArray<dimensions>::setMinLod(Float lod)

Set minimum level-of-detail parameter.

Returns Reference to self (for method chaining)

See Texture::setMinLod() for more information.

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

Set maximum level-of-detail parameter.

Returns Reference to self (for method chaining)

See Texture::setMaxLod() for more information.

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

Set level-of-detail bias.

Returns Reference to self (for method chaining)

See Texture::setLodBias() for more information.

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

Set wrapping.

Returns Reference to self (for method chaining)

See Texture::setWrapping() for more information.

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

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::GL::TextureArray<dimensions>::setBorderColor(const Color4& color)

Set border color.

Returns Reference to self (for method chaining)

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

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

Set border color for integer texture.

Returns Reference to self (for method chaining)

See Texture::setBorderColor(const Vector4ui&) for more information.

template<UnsignedInt dimensions>
TextureArray<dimensions>& Magnum::GL::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::GL::TextureArray<dimensions>::setMaxAnisotropy(Float anisotropy)

Set max anisotropy.

Returns Reference to self (for method chaining)

See Texture::setMaxAnisotropy() for more information.

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

Set sRGB decoding.

Returns Reference to self (for method chaining)

See Texture::setSRGBDecode() for more information.

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

Set component swizzle.

Returns Reference to self (for method chaining)

See Texture::setSwizzle() for more information.

template<UnsignedInt dimensions>
TextureArray<dimensions>& Magnum::GL::TextureArray<dimensions>::setCompareMode(SamplerCompareMode mode)

Set depth texture comparison mode.

Returns Reference to self (for method chaining)

See Texture::setCompareMode() for more information.

template<UnsignedInt dimensions>
TextureArray<dimensions>& Magnum::GL::TextureArray<dimensions>::setCompareFunction(SamplerCompareFunction function)

Set depth texture comparison function.

Returns Reference to self (for method chaining)

See Texture::setCompareFunction() for more information.

template<UnsignedInt dimensions>
TextureArray<dimensions>& Magnum::GL::TextureArray<dimensions>::setDepthStencilMode(SamplerDepthStencilMode mode)

Set depth/stencil texture mode.

Returns Reference to self (for method chaining)

See Texture::setDepthStencilMode() for more information.

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

Set storage.

Returns Reference to self (for method chaining)

See Texture::setStorage() for more information.

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

Image size in given mip level.

See Texture::imageSize() for more information.

template<UnsignedInt dimensions>
void Magnum::GL::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::GL::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::RGBA8Unorm});

template<UnsignedInt dimensions>
void Magnum::GL::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::GL::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:

GL::BufferImage3D image = texture.image(0,
    {PixelFormat::RGBA8Unorm}, GL::BufferUsage::StaticRead);

template<UnsignedInt dimensions>
void Magnum::GL::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::GL::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::GL::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::GL::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:

GL::CompressedBufferImage3D image = texture.compressedImage(0, {},
    GL::BufferUsage::StaticRead);

template<UnsignedInt dimensions>
void Magnum::GL::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::GL::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::RGBA8Unorm});

template<UnsignedInt dimensions>
void Magnum::GL::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::GL::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:

GL::BufferImage3D image = texture.subImage(0, range,
    {PixelFormat::RGBA8Unorm}, GL::BufferUsage::StaticRead);

template<UnsignedInt dimensions>
void Magnum::GL::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::GL::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::GL::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::GL::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:

GL::CompressedBufferImage3D image = texture.compressedSubImage(0, range, {},
    GL::BufferUsage::StaticRead);

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

Set image data.

Returns Reference to self (for method chaining)

See Texture::setImage() for more information.

template<UnsignedInt dimensions>
TextureArray<dimensions>& Magnum::GL::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::GL::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::GL::TextureArray<dimensions>::setCompressedImage(Int level, const CompressedImageView<dimensions+1>& image)

Set compressed image data.

Returns Reference to self (for method chaining)

See Texture::setCompressedImage() for more information.

template<UnsignedInt dimensions>
TextureArray<dimensions>& Magnum::GL::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::GL::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::GL::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::GL::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::GL::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::GL::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::GL::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::GL::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::GL::TextureArray<dimensions>::generateMipmap()

Generate mipmap.

Returns Reference to self (for method chaining)

See Texture::generateMipmap() for more information.

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

Invalidate texture image.

See Texture::invalidateImage() for more information.

template<UnsignedInt dimensions>
void Magnum::GL::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.