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.

Magnum::CubeMapTexture class

Cube map texture.

Texture used mainly for environment maps. It consists of 6 square textures generating 6 faces of the cube as following. Note that all images must be turned upside down (+Y is top):

          +----+
          | -Y |
+----+----+----+----+
| -Z | -X | +Z | +X |
+----+----+----+----+
          | +Y |
          +----+

Basic usage

See Texture documentation for introduction.

Common usage is to fully configure all texture parameters and then set the data from e.g. set of Image objects:

Image2D positiveX(PixelFormat::RGBA, PixelType::UnsignedByte, {256, 256}, data);
// ...

CubeMapTexture texture;
texture.setMagnificationFilter(Sampler::Filter::Linear)
    // ...
    .setStorage(Math::log2(256)+1, TextureFormat::RGBA8, {256, 256})
    .setSubImage(CubeMapCoordinate::PositiveX, 0, {}, positiveX)
    .setSubImage(CubeMapCoordinate::NegativeX, 0, {}, negativeX)
    // ...

In shader, the texture is used via samplerCube, samplerCubeShadow, isamplerCube or usamplerCube. Unlike in classic textures, coordinates for cube map textures is signed three-part vector from the center of the cube, which intersects one of the six sides of the cube map. See AbstractShaderProgram for more information about usage in shaders.

Base classes

class AbstractTexture
Base for textures.

Public types

using Coordinate = CubeMapCoordinate

Public static functions

static auto maxSize() -> Vector2i
Max supported size of one side of cube map texture.
static auto compressedBlockSize(TextureFormat format) -> Vector2i
static auto compressedBlockDataSize(TextureFormat format) -> Int
static auto wrap(GLuint id, ObjectFlags flags = {}) -> CubeMapTexture
Wrap existing OpenGL cube map texture object.

Constructors, destructors, conversion operators

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

Public functions

void bindImage(Int imageUnit, Int level, CubeMapCoordinate coordinate, ImageAccess access, ImageFormat format)
Bind level of given cube map texture coordinate to given image unit.
void bindImageLayered(Int imageUnit, Int level, ImageAccess access, ImageFormat format)
Bind level of layered cube map texture to given image unit.
auto setBaseLevel(Int level) -> CubeMapTexture&
auto setMaxLevel(Int level) -> CubeMapTexture&
auto setMinificationFilter(Sampler::Filter filter, Sampler::Mipmap mipmap = Sampler::Mipmap::Base) -> CubeMapTexture&
auto setMagnificationFilter(Sampler::Filter filter) -> CubeMapTexture&
auto setMinLod(Float lod) -> CubeMapTexture&
auto setMaxLod(Float lod) -> CubeMapTexture&
auto setLodBias(Float bias) -> CubeMapTexture&
auto setWrapping(const Array2D<Sampler::Wrapping>& wrapping) -> CubeMapTexture&
auto setBorderColor(const Color4& color) -> CubeMapTexture&
auto setBorderColor(const Vector4ui& color) -> CubeMapTexture&
auto setBorderColor(const Vector4i& color) -> CubeMapTexture&
auto setMaxAnisotropy(Float anisotropy) -> CubeMapTexture&
auto setSRGBDecode(bool decode) -> CubeMapTexture&
template<char r, char g, char b, char a>
auto setSwizzle() -> CubeMapTexture&
auto setCompareMode(Sampler::CompareMode mode) -> CubeMapTexture&
auto setCompareFunction(Sampler::CompareFunction function) -> CubeMapTexture&
auto setDepthStencilMode(Sampler::DepthStencilMode mode) -> CubeMapTexture&
auto setStorage(Int levels, TextureFormat internalFormat, const Vector2i& size) -> CubeMapTexture&
auto imageSize(Int level) -> Vector2i
auto imageSize(CubeMapCoordinate, Int level) -> Vector2i
void image(Int level, Image3D& image)
Read given mip level of texture to image.
auto image(Int level, Image3D&& image) -> Image3D
void image(Int level, BufferImage3D& image, BufferUsage usage)
Read given mip level of texture to buffer image.
auto image(Int level, BufferImage3D&& image, BufferUsage usage) -> BufferImage3D
void compressedImage(Int level, CompressedImage3D& image)
Read given mip level of compressed texture to image.
auto compressedImage(Int level, CompressedImage3D&& image) -> CompressedImage3D
void compressedImage(Int level, CompressedBufferImage3D& image, BufferUsage usage)
Read given mip level of compressed texture to buffer image.
auto compressedImage(Int level, CompressedBufferImage3D&& image, BufferUsage usage) -> CompressedBufferImage3D
void image(CubeMapCoordinate coordinate, Int level, Image2D& image)
Read given mip level and coordinate of texture to image.
auto image(CubeMapCoordinate coordinate, Int level, Image2D&& image) -> Image2D
void image(CubeMapCoordinate coordinate, Int level, BufferImage2D& image, BufferUsage usage)
Read given mip level and coordinate of texture to buffer image.
auto image(CubeMapCoordinate coordinate, Int level, BufferImage2D&& image, BufferUsage usage) -> BufferImage2D
void compressedImage(CubeMapCoordinate coordinate, Int level, CompressedImage2D& image)
Read given mip level and coordinate of compressed texture to image.
auto compressedImage(CubeMapCoordinate coordinate, Int level, CompressedImage2D&& image) -> CompressedImage2D
void compressedImage(CubeMapCoordinate coordinate, Int level, CompressedBufferImage2D& image, BufferUsage usage)
Read given mip level and coordinate of compressed texture to buffer image.
auto compressedImage(CubeMapCoordinate coordinate, Int level, CompressedBufferImage2D&& image, BufferUsage usage) -> CompressedBufferImage2D
void subImage(Int level, const Range3Di& range, Image3D& image)
auto subImage(Int level, const Range3Di& range, Image3D&& image) -> Image3D
void subImage(Int level, const Range3Di& range, BufferImage3D& image, BufferUsage usage)
auto subImage(Int level, const Range3Di& range, BufferImage3D&& image, BufferUsage usage) -> BufferImage3D
void compressedSubImage(Int level, const Range3Di& range, CompressedImage3D& image)
auto compressedSubImage(Int level, const Range3Di& range, CompressedImage3D&& image) -> CompressedImage3D
void compressedSubImage(Int level, const Range3Di& range, CompressedBufferImage3D& image, BufferUsage usage)
auto compressedSubImage(Int level, const Range3Di& range, CompressedBufferImage3D&& image, BufferUsage usage) -> CompressedBufferImage3D
auto setImage(CubeMapCoordinate coordinate, Int level, TextureFormat internalFormat, const ImageView2D& image) -> CubeMapTexture&
auto setImage(CubeMapCoordinate coordinate, Int level, TextureFormat internalFormat, BufferImage2D& image) -> CubeMapTexture&
auto setImage(CubeMapCoordinate coordinate, Int level, TextureFormat internalFormat, BufferImage2D&& image) -> CubeMapTexture&
auto setCompressedImage(CubeMapCoordinate coordinate, Int level, const CompressedImageView2D& image) -> CubeMapTexture&
auto setCompressedImage(CubeMapCoordinate coordinate, Int level, CompressedBufferImage2D& image) -> CubeMapTexture&
auto setCompressedImage(CubeMapCoordinate coordinate, Int level, CompressedBufferImage2D&& image) -> CubeMapTexture&
auto setSubImage(Int level, const Vector3i& offset, const ImageView3D& image) -> CubeMapTexture&
Set image subdata.
auto setSubImage(Int level, const Vector3i& offset, BufferImage3D& image) -> CubeMapTexture&
auto setSubImage(Int level, const Vector3i& offset, BufferImage3D&& image) -> CubeMapTexture&
auto setCompressedSubImage(Int level, const Vector3i& offset, const CompressedImageView3D& image) -> CubeMapTexture&
Set compressed image subdata.
auto setCompressedSubImage(Int level, const Vector3i& offset, CompressedBufferImage3D& image) -> CubeMapTexture&
auto setCompressedSubImage(Int level, const Vector3i& offset, CompressedBufferImage3D&& image) -> CubeMapTexture&
auto setSubImage(CubeMapCoordinate coordinate, Int level, const Vector2i& offset, const ImageView2D& image) -> CubeMapTexture&
auto setSubImage(CubeMapCoordinate coordinate, Int level, const Vector2i& offset, BufferImage2D& image) -> CubeMapTexture&
auto setSubImage(CubeMapCoordinate coordinate, Int level, const Vector2i& offset, BufferImage2D&& image) -> CubeMapTexture&
auto setCompressedSubImage(CubeMapCoordinate coordinate, Int level, const Vector2i& offset, const CompressedImageView2D& image) -> CubeMapTexture&
auto setCompressedSubImage(CubeMapCoordinate coordinate, Int level, const Vector2i& offset, CompressedBufferImage2D& image) -> CubeMapTexture&
auto setCompressedSubImage(CubeMapCoordinate coordinate, Int level, const Vector2i& offset, CompressedBufferImage2D&& image) -> CubeMapTexture&
auto generateMipmap() -> CubeMapTexture&
void invalidateImage(Int level)
void invalidateSubImage(Int level, const Vector3i& offset, const Vector3i& size)

Typedef documentation

typedef CubeMapCoordinate Magnum::CubeMapTexture::Coordinate

Cube map coordinate.

Function documentation

static Vector2i Magnum::CubeMapTexture::maxSize()

Max supported size of one side of cube map texture.

The result is cached, repeated queries don't result in repeated OpenGL calls.

static Vector2i Magnum::CubeMapTexture::compressedBlockSize(TextureFormat format)

Compressed block size.

See Texture::compressedBlockSize() for more information.

static Int Magnum::CubeMapTexture::compressedBlockDataSize(TextureFormat format)

Compressed block data size.

See Texture::compressedBlockDataSize() for more information.

static CubeMapTexture Magnum::CubeMapTexture::wrap(GLuint id, ObjectFlags flags = {})

Wrap existing OpenGL cube map texture object.

Parameters
id OpenGL cube map texture ID
flags Object creation flags

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

Magnum::CubeMapTexture::CubeMapTexture() 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.

Magnum::CubeMapTexture::CubeMapTexture(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.

void Magnum::CubeMapTexture::bindImage(Int imageUnit, Int level, CubeMapCoordinate coordinate, ImageAccess access, ImageFormat format)

Bind level of given cube map texture coordinate to given image unit.

Parameters
imageUnit Image unit
level Texture level
coordinate Cube map coordinate
access Image access
format Image format

void Magnum::CubeMapTexture::bindImageLayered(Int imageUnit, Int level, ImageAccess access, ImageFormat format)

Bind level of layered cube map texture to given image unit.

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

CubeMapTexture& Magnum::CubeMapTexture::setBaseLevel(Int level)

Returns Reference to self (for method chaining)

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

CubeMapTexture& Magnum::CubeMapTexture::setMaxLevel(Int level)

Returns Reference to self (for method chaining)

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

CubeMapTexture& Magnum::CubeMapTexture::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.

CubeMapTexture& Magnum::CubeMapTexture::setMagnificationFilter(Sampler::Filter filter)

Returns Reference to self (for method chaining)

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

CubeMapTexture& Magnum::CubeMapTexture::setMinLod(Float lod)

Returns Reference to self (for method chaining)

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

CubeMapTexture& Magnum::CubeMapTexture::setMaxLod(Float lod)

Returns Reference to self (for method chaining)

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

CubeMapTexture& Magnum::CubeMapTexture::setLodBias(Float bias)

Returns Reference to self (for method chaining)

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

CubeMapTexture& Magnum::CubeMapTexture::setWrapping(const Array2D<Sampler::Wrapping>& wrapping)

Returns Reference to self (for method chaining)

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

CubeMapTexture& Magnum::CubeMapTexture::setBorderColor(const Color4& color)

Returns Reference to self (for method chaining)

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

CubeMapTexture& Magnum::CubeMapTexture::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.

CubeMapTexture& Magnum::CubeMapTexture::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.

CubeMapTexture& Magnum::CubeMapTexture::setMaxAnisotropy(Float anisotropy)

Returns Reference to self (for method chaining)

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

CubeMapTexture& Magnum::CubeMapTexture::setSRGBDecode(bool decode)

Returns Reference to self (for method chaining)

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

template<char r, char g, char b, char a>
CubeMapTexture& Magnum::CubeMapTexture::setSwizzle()

Returns Reference to self (for method chaining)

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

CubeMapTexture& Magnum::CubeMapTexture::setCompareMode(Sampler::CompareMode mode)

Returns Reference to self (for method chaining)

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

CubeMapTexture& Magnum::CubeMapTexture::setCompareFunction(Sampler::CompareFunction function)

Returns Reference to self (for method chaining)

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

CubeMapTexture& Magnum::CubeMapTexture::setDepthStencilMode(Sampler::DepthStencilMode mode)

Returns Reference to self (for method chaining)

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

CubeMapTexture& Magnum::CubeMapTexture::setStorage(Int levels, TextureFormat internalFormat, const Vector2i& size)

Returns Reference to self (for method chaining)

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

Vector2i Magnum::CubeMapTexture::imageSize(Int level)

Image size in given mip level.

If ARB_direct_state_access (part of OpenGL 4.5) is not available, it is assumed that faces have the same size and just the size of Coordinate::PositiveX face is queried. See Texture::imageSize() for more information.

Vector2i Magnum::CubeMapTexture::imageSize(CubeMapCoordinate, Int level)

void Magnum::CubeMapTexture::image(Int level, Image3D& image)

Read given mip level of texture to image.

Image parameters like format and type of pixel data are taken from given image, image size is taken from the texture using imageSize(). The storage is not reallocated if it is large enough to contain the new data.

The operation is protected from buffer overflow.

Image3D Magnum::CubeMapTexture::image(Int level, Image3D&& 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});

void Magnum::CubeMapTexture::image(Int level, BufferImage3D& image, BufferUsage usage)

Read given mip level of texture to buffer image.

See image(Int, Image3D&) for more information. The storage is not reallocated if it is large enough to contain the new data, which means that usage might get ignored.

BufferImage3D Magnum::CubeMapTexture::image(Int level, BufferImage3D&& 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);

void Magnum::CubeMapTexture::compressedImage(Int level, CompressedImage3D& image)

Read given mip level of compressed texture to image.

Compression format and data size are taken from the texture, image size is taken using imageSize(). The storage is not reallocated if it is large enough to contain the new data.

CompressedImage3D Magnum::CubeMapTexture::compressedImage(Int level, CompressedImage3D&& 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, {});

void Magnum::CubeMapTexture::compressedImage(Int level, CompressedBufferImage3D& image, BufferUsage usage)

Read given mip level of compressed texture to buffer image.

See compressedImage(Int, CompressedImage3D&) for more information. The storage is not reallocated if it is large enough to contain the new data, which means that usage might get ignored.

CompressedBufferImage3D Magnum::CubeMapTexture::compressedImage(Int level, CompressedBufferImage3D&& 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);

void Magnum::CubeMapTexture::image(CubeMapCoordinate coordinate, Int level, Image2D& image)

Read given mip level and coordinate of texture to image.

Image parameters like format and type of pixel data are taken from given image, image size is taken from the texture using imageSize(). The storage is not reallocated if it is large enough to contain the new data.

If neither ARB_get_texture_sub_image (part of OpenGL 4.5) nor EXT_direct_state_access is available, the texture is bound before the operation (if not already). If either ARB_get_texture_sub_image or ARB_robustness is available, the operation is protected from buffer overflow. However, if ARB_get_texture_sub_image is not available and both EXT_direct_state_access and ARB_robustness are available, the robust operation is preferred over DSA.

Image2D Magnum::CubeMapTexture::image(CubeMapCoordinate coordinate, Int level, Image2D&& 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: Image2D image = texture.image(CubeMapCoordinate::PositiveX, 0, {PixelFormat::RGBA, PixelType::UnsignedByte});

void Magnum::CubeMapTexture::image(CubeMapCoordinate coordinate, Int level, BufferImage2D& image, BufferUsage usage)

Read given mip level and coordinate of texture to buffer image.

See image(Coordinate, Int, Image2D&) for more information. The storage is not reallocated if it is large enough to contain the new data, which means that usage might get ignored.

BufferImage2D Magnum::CubeMapTexture::image(CubeMapCoordinate coordinate, Int level, BufferImage2D&& 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: BufferImage2D image = texture.image(CubeMapCoordinate::PositiveX, 0, {PixelFormat::RGBA, PixelType::UnsignedByte}, BufferUsage::StaticRead);

void Magnum::CubeMapTexture::compressedImage(CubeMapCoordinate coordinate, Int level, CompressedImage2D& image)

Read given mip level and coordinate of compressed texture to image.

Compression format and data size are taken from the texture, image size is taken using imageSize(). The storage is not reallocated if it is large enough to contain the new data.

If neither ARB_get_texture_sub_image (part of OpenGL 4.5) nor EXT_direct_state_access is available, the texture is bound before the operation (if not already). If either ARB_get_texture_sub_image or ARB_robustness is available, the operation is protected from buffer overflow. However, if ARB_get_texture_sub_image is not available and both EXT_direct_state_access and ARB_robustness are available, the robust operation is preferred over DSA.

CompressedImage2D Magnum::CubeMapTexture::compressedImage(CubeMapCoordinate coordinate, Int level, CompressedImage2D&& 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: CompressedImage2D image = texture.compressedImage(CubeMapCoordinate::PositiveX, 0, {});

void Magnum::CubeMapTexture::compressedImage(CubeMapCoordinate coordinate, Int level, CompressedBufferImage2D& image, BufferUsage usage)

Read given mip level and coordinate of compressed texture to buffer image.

See compressedImage(Coordinate, Int, CompressedImage2D&) for more information. The storage is not reallocated if it is large enough to contain the new data, which means that usage might get ignored.

CompressedBufferImage2D Magnum::CubeMapTexture::compressedImage(CubeMapCoordinate coordinate, Int level, CompressedBufferImage2D&& 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: CompressedBufferImage2D image = texture.compressedImage(CubeMapCoordinate::PositiveX, 0, {}, BufferUsage::StaticRead);

void Magnum::CubeMapTexture::subImage(Int level, const Range3Di& range, Image3D& image)

Read range of given texture mip level to image.

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

Image3D Magnum::CubeMapTexture::subImage(Int level, const Range3Di& range, Image3D&& 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});

void Magnum::CubeMapTexture::subImage(Int level, const Range3Di& range, BufferImage3D& 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.

BufferImage3D Magnum::CubeMapTexture::subImage(Int level, const Range3Di& range, BufferImage3D&& 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);

void Magnum::CubeMapTexture::compressedSubImage(Int level, const Range3Di& range, CompressedImage3D& image)

Read range of given compressed texture mip level to image.

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

CompressedImage3D Magnum::CubeMapTexture::compressedSubImage(Int level, const Range3Di& range, CompressedImage3D&& 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, {});

void Magnum::CubeMapTexture::compressedSubImage(Int level, const Range3Di& range, CompressedBufferImage3D& 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.

CompressedBufferImage3D Magnum::CubeMapTexture::compressedSubImage(Int level, const Range3Di& range, CompressedBufferImage3D&& 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);

CubeMapTexture& Magnum::CubeMapTexture::setImage(CubeMapCoordinate coordinate, Int level, TextureFormat internalFormat, const ImageView2D& image)

Returns Reference to self (for method chaining)

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

CubeMapTexture& Magnum::CubeMapTexture::setImage(CubeMapCoordinate coordinate, Int level, TextureFormat internalFormat, BufferImage2D& image)

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

CubeMapTexture& Magnum::CubeMapTexture::setImage(CubeMapCoordinate coordinate, Int level, TextureFormat internalFormat, BufferImage2D&& image)

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

CubeMapTexture& Magnum::CubeMapTexture::setCompressedImage(CubeMapCoordinate coordinate, Int level, const CompressedImageView2D& image)

Returns Reference to self (for method chaining)

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

CubeMapTexture& Magnum::CubeMapTexture::setCompressedImage(CubeMapCoordinate coordinate, Int level, CompressedBufferImage2D& image)

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

CubeMapTexture& Magnum::CubeMapTexture::setCompressedImage(CubeMapCoordinate coordinate, Int level, CompressedBufferImage2D&& image)

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

CubeMapTexture& Magnum::CubeMapTexture::setSubImage(Int level, const Vector3i& offset, const ImageView3D& image)

Set image subdata.

Parameters
level Mip level
offset Offset where to put data in the texture
image Image3D, ImageView3D or Trade::ImageData3D
Returns Reference to self (for method chaining)

CubeMapTexture& Magnum::CubeMapTexture::setSubImage(Int level, const Vector3i& offset, BufferImage3D& image)

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

CubeMapTexture& Magnum::CubeMapTexture::setSubImage(Int level, const Vector3i& offset, BufferImage3D&& image)

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

CubeMapTexture& Magnum::CubeMapTexture::setCompressedSubImage(Int level, const Vector3i& offset, const CompressedImageView3D& image)

Set compressed image subdata.

Parameters
level Mip level
offset Offset where to put data in the texture
image CompressedImage3D, CompressedImageView3D or compressed Trade::ImageData3D
Returns Reference to self (for method chaining)

CubeMapTexture& Magnum::CubeMapTexture::setCompressedSubImage(Int level, const Vector3i& offset, CompressedBufferImage3D& image)

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

CubeMapTexture& Magnum::CubeMapTexture::setCompressedSubImage(Int level, const Vector3i& offset, CompressedBufferImage3D&& image)

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

CubeMapTexture& Magnum::CubeMapTexture::setSubImage(CubeMapCoordinate coordinate, Int level, const Vector2i& offset, const ImageView2D& image)

Returns Reference to self (for method chaining)

Set image subdata. See Texture::setSubImage() for more information.

CubeMapTexture& Magnum::CubeMapTexture::setSubImage(CubeMapCoordinate coordinate, Int level, const Vector2i& offset, BufferImage2D& image)

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

CubeMapTexture& Magnum::CubeMapTexture::setSubImage(CubeMapCoordinate coordinate, Int level, const Vector2i& offset, BufferImage2D&& image)

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

CubeMapTexture& Magnum::CubeMapTexture::setCompressedSubImage(CubeMapCoordinate coordinate, Int level, const Vector2i& offset, const CompressedImageView2D& image)

Returns Reference to self (for method chaining)

Set compressed image subdata. See Texture::setCompressedSubImage() for more information.

CubeMapTexture& Magnum::CubeMapTexture::setCompressedSubImage(CubeMapCoordinate coordinate, Int level, const Vector2i& offset, CompressedBufferImage2D& image)

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

CubeMapTexture& Magnum::CubeMapTexture::setCompressedSubImage(CubeMapCoordinate coordinate, Int level, const Vector2i& offset, CompressedBufferImage2D&& image)

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

CubeMapTexture& Magnum::CubeMapTexture::generateMipmap()

Returns Reference to self (for method chaining)

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

void Magnum::CubeMapTexture::invalidateImage(Int level)

Invalidate texture image.

See Texture::invalidateImage() for more information.

void Magnum::CubeMapTexture::invalidateSubImage(Int level, const Vector3i& offset, const Vector3i& size)

Invalidate texture subimage.

Z coordinate is equivalent to number of texture face, i.e. Coordinate::PositiveX is 0 and so on, in the same order as in the enum.

See Texture::invalidateSubImage() for more information.