Magnum::GL::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:

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

GL::CubeMapTexture texture;
texture.setMagnificationFilter(GL::SamplerFilter::Linear)
    // ...
    .setStorage(Math::log2(256)+1, GL::TextureFormat::RGBA8, {256, 256})
    .setSubImage(GL::CubeMapCoordinate::PositiveX, 0, {}, positiveX)
    .setSubImage(GL::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 deprecated
Cube map coordinate.

Public static functions

static auto maxSize() -> Vector2i
Max supported size of one side of cube map texture.
static auto compressedBlockSize(TextureFormat format) -> Vector2i
Compressed block size.
static auto compressedBlockDataSize(TextureFormat format) -> Int
Compressed block data size.
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&
Set base mip level.
auto setMaxLevel(Int level) -> CubeMapTexture&
Set max mip level.
auto setMinificationFilter(SamplerFilter filter, SamplerMipmap mipmap = SamplerMipmap::Base) -> CubeMapTexture&
Set minification filter.
auto setMinificationFilter(Magnum::SamplerFilter filter, Magnum::SamplerMipmap mipmap = Magnum::SamplerMipmap::Base) -> CubeMapTexture&
auto setMagnificationFilter(SamplerFilter filter) -> CubeMapTexture&
Set magnification filter.
auto setMagnificationFilter(Magnum::SamplerFilter filter) -> CubeMapTexture&
auto setMinLod(Float lod) -> CubeMapTexture&
Set minimum level-of-detail parameter.
auto setMaxLod(Float lod) -> CubeMapTexture&
Set maximum level-of-detail parameter.
auto setLodBias(Float bias) -> CubeMapTexture&
Set level-of-detail bias.
auto setWrapping(const Array2D<SamplerWrapping>& wrapping) -> CubeMapTexture&
Set wrapping.
auto setWrapping(const Array2D<Magnum::SamplerWrapping>& wrapping) -> CubeMapTexture&
auto setBorderColor(const Color4& color) -> CubeMapTexture&
Set border color.
auto setBorderColor(const Vector4ui& color) -> CubeMapTexture&
Set border color for integer texture.
auto setBorderColor(const Vector4i& color) -> CubeMapTexture&
auto setMaxAnisotropy(Float anisotropy) -> CubeMapTexture&
Set max anisotropy.
auto setSRGBDecode(bool decode) -> CubeMapTexture&
Set sRGB decoding.
template<char r, char g, char b, char a>
auto setSwizzle() -> CubeMapTexture&
Set component swizzle.
auto setCompareMode(SamplerCompareMode mode) -> CubeMapTexture&
Set depth texture comparison mode.
auto setCompareFunction(SamplerCompareFunction function) -> CubeMapTexture&
Set depth texture comparison function.
auto setDepthStencilMode(SamplerDepthStencilMode mode) -> CubeMapTexture&
Set depth/stencil texture mode.
auto setStorage(Int levels, TextureFormat internalFormat, const Vector2i& size) -> CubeMapTexture&
Set storage.
auto imageSize(Int level) -> Vector2i
Image size in given mip level.
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)
Read range of given texture mip level to image.
auto subImage(Int level, const Range3Di& range, Image3D&& image) -> Image3D
void subImage(Int level, const Range3Di& range, BufferImage3D& image, BufferUsage usage)
Read range of given texture mip level to buffer image.
auto subImage(Int level, const Range3Di& range, BufferImage3D&& image, BufferUsage usage) -> BufferImage3D
void compressedSubImage(Int level, const Range3Di& range, CompressedImage3D& image)
Read range of given compressed texture mip level to image.
auto compressedSubImage(Int level, const Range3Di& range, CompressedImage3D&& image) -> CompressedImage3D
void compressedSubImage(Int level, const Range3Di& range, CompressedBufferImage3D& image, BufferUsage usage)
Read range of given compressed texture mip level to buffer image.
auto compressedSubImage(Int level, const Range3Di& range, CompressedBufferImage3D&& image, BufferUsage usage) -> CompressedBufferImage3D
auto setImage(CubeMapCoordinate coordinate, Int level, TextureFormat internalFormat, const ImageView2D& image) -> CubeMapTexture&
Set image data.
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&
Set compressed image data.
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&
Set image subdata.
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&
Set compressed image subdata.
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&
Generate mipmap.
void invalidateImage(Int level)
Invalidate texture image.
void invalidateSubImage(Int level, const Vector3i& offset, const Vector3i& size)
Invalidate texture subimage.

Typedef documentation

typedef CubeMapCoordinate Magnum::GL::CubeMapTexture::Coordinate

Cube map coordinate.

Function documentation

static Vector2i Magnum::GL::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::GL::CubeMapTexture::compressedBlockSize(TextureFormat format)

Compressed block size.

See Texture::compressedBlockSize() for more information.

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

Compressed block data size.

See Texture::compressedBlockDataSize() for more information.

static CubeMapTexture Magnum::GL::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::GL::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::GL::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::GL::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::GL::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::GL::CubeMapTexture::setBaseLevel(Int level)

Set base mip level.

Returns Reference to self (for method chaining)

See Texture::setBaseLevel() for more information.

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

Set max mip level.

Returns Reference to self (for method chaining)

See Texture::setMaxLevel() for more information.

CubeMapTexture& Magnum::GL::CubeMapTexture::setMinificationFilter(SamplerFilter filter, SamplerMipmap mipmap = SamplerMipmap::Base)

Set minification filter.

Returns Reference to self (for method chaining)

See Texture::setMinificationFilter() for more information.

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

CubeMapTexture& Magnum::GL::CubeMapTexture::setMagnificationFilter(SamplerFilter filter)

Set magnification filter.

Returns Reference to self (for method chaining)

See Texture::setMagnificationFilter() for more information.

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

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

Set minimum level-of-detail parameter.

Returns Reference to self (for method chaining)

See Texture::setMinLod() for more information.

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

Set maximum level-of-detail parameter.

Returns Reference to self (for method chaining)

See Texture::setMaxLod() for more information.

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

Set level-of-detail bias.

Returns Reference to self (for method chaining)

See Texture::setLodBias() for more information.

CubeMapTexture& Magnum::GL::CubeMapTexture::setWrapping(const Array2D<SamplerWrapping>& wrapping)

Set wrapping.

Returns Reference to self (for method chaining)

See Texture::setWrapping() for more information.

CubeMapTexture& Magnum::GL::CubeMapTexture::setWrapping(const Array2D<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.

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

Set border color.

Returns Reference to self (for method chaining)

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

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

CubeMapTexture& Magnum::GL::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::GL::CubeMapTexture::setMaxAnisotropy(Float anisotropy)

Set max anisotropy.

Returns Reference to self (for method chaining)

See Texture::setMaxAnisotropy() for more information.

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

Set sRGB decoding.

Returns Reference to self (for method chaining)

See Texture::setSRGBDecode() for more information.

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

Set component swizzle.

Returns Reference to self (for method chaining)

See Texture::setSwizzle() for more information.

CubeMapTexture& Magnum::GL::CubeMapTexture::setCompareMode(SamplerCompareMode mode)

Set depth texture comparison mode.

Returns Reference to self (for method chaining)

See Texture::setCompareMode() for more information.

CubeMapTexture& Magnum::GL::CubeMapTexture::setCompareFunction(SamplerCompareFunction function)

Set depth texture comparison function.

Returns Reference to self (for method chaining)

See Texture::setCompareFunction() for more information.

CubeMapTexture& Magnum::GL::CubeMapTexture::setDepthStencilMode(SamplerDepthStencilMode mode)

Set depth/stencil texture mode.

Returns Reference to self (for method chaining)

See Texture::setDepthStencilMode() for more information.

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

Set storage.

Returns Reference to self (for method chaining)

See Texture::setStorage() for more information.

Vector2i Magnum::GL::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.

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

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

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

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

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

void Magnum::GL::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::GL::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(GL::CubeMapCoordinate::PositiveX, 0,
    {PixelFormat::RGBA8Unorm});

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

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

See image(CubeMapCoordinate, 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::GL::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:

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

void Magnum::GL::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::GL::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(GL::CubeMapCoordinate::PositiveX,
    0, {});

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

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

See compressedImage(CubeMapCoordinate, 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::GL::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:

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

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

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

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

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

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

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

Set image data.

Returns Reference to self (for method chaining)

See Texture::setImage() for more information.

CubeMapTexture& Magnum::GL::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::GL::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::GL::CubeMapTexture::setCompressedImage(CubeMapCoordinate coordinate, Int level, const CompressedImageView2D& image)

Set compressed image data.

Returns Reference to self (for method chaining)

See Texture::setCompressedImage() for more information.

CubeMapTexture& Magnum::GL::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::GL::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::GL::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::GL::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::GL::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::GL::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::GL::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::GL::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::GL::CubeMapTexture::setSubImage(CubeMapCoordinate coordinate, Int level, const Vector2i& offset, const ImageView2D& image)

Set image subdata.

Returns Reference to self (for method chaining)

See Texture::setSubImage() for more information.

CubeMapTexture& Magnum::GL::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::GL::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::GL::CubeMapTexture::setCompressedSubImage(CubeMapCoordinate coordinate, Int level, const Vector2i& offset, const CompressedImageView2D& image)

Set compressed image subdata.

Returns Reference to self (for method chaining)

See Texture::setCompressedSubImage() for more information.

CubeMapTexture& Magnum::GL::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::GL::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::GL::CubeMapTexture::generateMipmap()

Generate mipmap.

Returns Reference to self (for method chaining)

See Texture::generateMipmap() for more information.

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

Invalidate texture image.

See Texture::invalidateImage() for more information.

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