class
#include <Magnum/GL/CubeMapTextureArray.h>
CubeMapTextureArray Cube map texture array.
See CubeMapTexture documentation for introduction.
Usage
See Texture documentation for introduction.
Common usage is to specify each layer and face separately using setSubImage(). You have to allocate the memory for all layers and faces first by calling setStorage(). Example: array with 4 layers of cube maps, each cube map consisting of six 64x64 images, i.e. 24 layers total:
GL::CubeMapTextureArray texture; texture.setMagnificationFilter(GL::SamplerFilter::Linear) // ... .setStorage(Math::log2(64)+1, GL::TextureFormat::RGBA8, {64, 64, 24}); for(std::size_t i = 0; i != 4; i += 6) { ImageView3D imagePositiveX(PixelFormat::RGBA8Unorm, {64, 64, 1}, data); // ... texture.setSubImage(0, Vector3i::zAxis(i+0), imagePositiveX); texture.setSubImage(0, Vector3i::zAxis(i+1), imageNegativeX); texture.setSubImage(0, Vector3i::zAxis(i+2), imagePositiveY); // ... } texture.generateMipmap();
In shader, the texture is used via samplerCubeArray
, samplerCubeArrayShadow
, isamplerCubeArray
or usamplerCubeArray
. Unlike in classic textures, coordinates for cube map texture arrays is signed four-part vector. First three parts define vector from the center of the cube which intersects with one of the six sides of the cube map, fourth part is layer in the array. See AbstractShaderProgram for more information about usage in shaders.
Base classes
- class AbstractTexture
- Base for textures.
Public static functions
- static auto maxSize() -> Vector3i
- Max supported size of one side of cube map texture array.
- static auto compressedBlockSize(TextureFormat format) -> Vector2i
- Compressed block size.
- static auto compressedBlockDataSize(TextureFormat format) -> Int
- Compressed block data size.
- static auto view(CubeMapTextureArray& original, TextureFormat internalFormat, Int levelOffset, Int levelCount, Int layerOffset, Int layerCount) -> CubeMapTextureArray new in Git master
- Create a view on another cube map texture array.
- static auto view(CubeMapTexture& original, TextureFormat internalFormat, Int levelOffset, Int levelCount) -> CubeMapTextureArray new in Git master
- Create a view on a cube map texture.
- static auto wrap(GLuint id, ObjectFlags flags = {}) -> CubeMapTextureArray
- Wrap existing OpenGL cube map array texture object.
Constructors, destructors, conversion operators
- CubeMapTextureArray() explicit
- Constructor.
- CubeMapTextureArray(NoCreateT) explicit noexcept
- Construct without creating the underlying OpenGL object.
- CubeMapTextureArray(const CubeMapTextureArray&) deleted
- Copying is not allowed.
- CubeMapTextureArray(CubeMapTextureArray&&) defaulted noexcept
- Move constructor.
Public functions
- auto operator=(const CubeMapTextureArray&) -> CubeMapTextureArray& deleted
- Copying is not allowed.
- auto operator=(CubeMapTextureArray&&) -> CubeMapTextureArray& defaulted noexcept
- Move assignment.
- 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) -> CubeMapTextureArray&
- Set base mip level.
- auto setMaxLevel(Int level) -> CubeMapTextureArray&
- Set max mip level.
-
auto setMinificationFilter(SamplerFilter filter,
SamplerMipmap mipmap = SamplerMipmap::
Base) -> CubeMapTextureArray& - Set minification filter.
-
auto setMinificationFilter(Magnum::
SamplerFilter filter, Magnum:: SamplerMipmap mipmap = Magnum:: SamplerMipmap:: Base) -> CubeMapTextureArray& - auto setMagnificationFilter(SamplerFilter filter) -> CubeMapTextureArray&
- Set magnification filter.
-
auto setMagnificationFilter(Magnum::
SamplerFilter filter) -> CubeMapTextureArray& - auto setMinLod(Float lod) -> CubeMapTextureArray&
- Set the minimum level-of-detail.
- auto setMaxLod(Float lod) -> CubeMapTextureArray&
- Set the maximum level-of-detail.
- auto setLodBias(Float bias) -> CubeMapTextureArray&
- Set level-of-detail bias.
-
auto setWrapping(const Math::
Vector2<SamplerWrapping>& wrapping) -> CubeMapTextureArray& - Set wrapping.
-
auto setWrapping(const Math::
Vector2<Magnum:: SamplerWrapping>& wrapping) -> CubeMapTextureArray& - auto setWrapping(SamplerWrapping wrapping) -> CubeMapTextureArray&
- Set the same wrapping for all dimensions.
-
auto setWrapping(Magnum::
SamplerWrapping wrapping) -> CubeMapTextureArray& - auto setBorderColor(const Color4& color) -> CubeMapTextureArray&
- Set border color.
- auto setBorderColor(const Vector4ui& color) -> CubeMapTextureArray&
- Set border color for integer texture.
- auto setBorderColor(const Vector4i& color) -> CubeMapTextureArray&
- auto setMaxAnisotropy(Float anisotropy) -> CubeMapTextureArray&
- Set max anisotropy.
- auto setSrgbDecode(bool decode) -> CubeMapTextureArray&
- Set sRGB decoding.
-
template<char r, char g, char b, char a>auto setSwizzle() -> CubeMapTextureArray&
- Set component swizzle.
- auto setCompareMode(SamplerCompareMode mode) -> CubeMapTextureArray&
- Set depth texture comparison mode.
- auto setCompareFunction(SamplerCompareFunction function) -> CubeMapTextureArray&
- Set depth texture comparison function.
- auto setDepthStencilMode(SamplerDepthStencilMode mode) -> CubeMapTextureArray&
- Set depth/stencil texture mode.
- auto setStorage(Int levels, TextureFormat internalFormat, const Vector3i& size) -> CubeMapTextureArray&
- Set storage.
- auto imageSize(Int level) -> Vector3i
- Image size in given mip level.
- void image(Int level, Image3D& image)
- Read given texture mip level to an image.
- auto image(Int level, Image3D&& image) -> Image3D
- void image(Int level, const MutableImageView3D& image) new in 2019.10
- Read given texture mip level to an image view.
- void image(Int level, BufferImage3D& image, BufferUsage usage)
- Read given texture mip level to a buffer image.
- auto image(Int level, BufferImage3D&& image, BufferUsage usage) -> BufferImage3D
- void compressedImage(Int level, CompressedImage3D& image)
- Read given compressed texture mip level to an image.
- auto compressedImage(Int level, CompressedImage3D&& image) -> CompressedImage3D
- void compressedImage(Int level, const MutableCompressedImageView3D& image) new in 2019.10
- Read given compressed texture mip level to an image view.
- void compressedImage(Int level, CompressedBufferImage3D& image, BufferUsage usage)
- Read given compressed texture mip level to a buffer image.
- auto compressedImage(Int level, CompressedBufferImage3D&& image, BufferUsage usage) -> CompressedBufferImage3D
- void subImage(Int level, const Range3Di& range, Image3D& image)
- Read a range of given texture mip level to an image.
- auto subImage(Int level, const Range3Di& range, Image3D&& image) -> Image3D
- void subImage(Int level, const Range3Di& range, const MutableImageView3D& image) new in 2019.10
- Read a range of given texture mip level to an image view.
- void subImage(Int level, const Range3Di& range, BufferImage3D& image, BufferUsage usage)
- Read a range of given texture mip level to a buffer image.
- auto subImage(Int level, const Range3Di& range, BufferImage3D&& image, BufferUsage usage) -> BufferImage3D
- void compressedSubImage(Int level, const Range3Di& range, CompressedImage3D& image)
- Read a range of given compressed texture mip level to an image.
- auto compressedSubImage(Int level, const Range3Di& range, CompressedImage3D&& image) -> CompressedImage3D
- void compressedSubImage(Int level, const Range3Di& range, const MutableCompressedImageView3D& image) new in 2019.10
- Read a range of given compressed texture mip level to an image view.
- void compressedSubImage(Int level, const Range3Di& range, CompressedBufferImage3D& image, BufferUsage usage)
- Read a range of given compressed texture mip level to a buffer image.
- auto compressedSubImage(Int level, const Range3Di& range, CompressedBufferImage3D&& image, BufferUsage usage) -> CompressedBufferImage3D
- auto setImage(Int level, TextureFormat internalFormat, const ImageView3D& image) -> CubeMapTextureArray&
- Set image data.
- auto setImage(Int level, TextureFormat internalFormat, BufferImage3D& image) -> CubeMapTextureArray&
- auto setImage(Int level, TextureFormat internalFormat, BufferImage3D&& image) -> CubeMapTextureArray&
- auto setCompressedImage(Int level, const CompressedImageView3D& image) -> CubeMapTextureArray&
- Set compressed image data.
- auto setCompressedImage(Int level, CompressedBufferImage3D& image) -> CubeMapTextureArray&
- auto setCompressedImage(Int level, CompressedBufferImage3D&& image) -> CubeMapTextureArray&
- auto setSubImage(Int level, const Vector3i& offset, const ImageView3D& image) -> CubeMapTextureArray&
- Set image subdata.
- auto setSubImage(Int level, const Vector3i& offset, BufferImage3D& image) -> CubeMapTextureArray&
- auto setSubImage(Int level, const Vector3i& offset, BufferImage3D&& image) -> CubeMapTextureArray&
- auto setCompressedSubImage(Int level, const Vector3i& offset, const CompressedImageView3D& image) -> CubeMapTextureArray&
- Set compressed image subdata.
- auto setCompressedSubImage(Int level, const Vector3i& offset, CompressedBufferImage3D& image) -> CubeMapTextureArray&
- auto setCompressedSubImage(Int level, const Vector3i& offset, CompressedBufferImage3D&& image) -> CubeMapTextureArray&
- auto generateMipmap() -> CubeMapTextureArray&
- Generate mipmap.
- void invalidateImage(Int level)
- Invalidate texture image.
- void invalidateSubImage(Int level, const Vector3i& offset, const Vector3i& size)
- Invalidate texture subimage.
Function documentation
static Vector3i Magnum:: GL:: CubeMapTextureArray:: maxSize()
Max supported size of one side of cube map texture array.
The result is cached, repeated queries don't result in repeated OpenGL calls. If ARB_
static Vector2i Magnum:: GL:: CubeMapTextureArray:: compressedBlockSize(TextureFormat format)
Compressed block size.
See Texture::
static Int Magnum:: GL:: CubeMapTextureArray:: compressedBlockDataSize(TextureFormat format)
Compressed block data size.
See Texture::
static CubeMapTextureArray Magnum:: GL:: CubeMapTextureArray:: view(CubeMapTextureArray& original,
TextureFormat internalFormat,
Int levelOffset,
Int levelCount,
Int layerOffset,
Int layerCount) new in Git master
Create a view on another cube map texture array.
The internalFormat
has to either match the format of original
, or be compatible with it, such as having the same pixel size and other restrictions described in the OpenGL specification.
static CubeMapTextureArray Magnum:: GL:: CubeMapTextureArray:: view(CubeMapTexture& original,
TextureFormat internalFormat,
Int levelOffset,
Int levelCount) new in Git master
Create a view on a cube map texture.
The internalFormat
has to either match the format of original
, or be compatible with it, such as having the same pixel size and other restrictions described in the OpenGL specification.
static CubeMapTextureArray Magnum:: GL:: CubeMapTextureArray:: wrap(GLuint id,
ObjectFlags flags = {})
Wrap existing OpenGL cube map array texture object.
Parameters | |
---|---|
id | OpenGL cube map array texture ID |
flags | Object creation flags |
The id
is expected to be of an existing OpenGL texture object with target GL_TEXTURE_CUBE_MAP_ARRAY
. Unlike texture created using constructor, the OpenGL object is by default not deleted on destruction, use flags
for different behavior.
Magnum:: GL:: CubeMapTextureArray:: CubeMapTextureArray() explicit
Constructor.
Creates new OpenGL texture object. If ARB_
Magnum:: GL:: CubeMapTextureArray:: CubeMapTextureArray(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. However note that this is a low-level and a potentially dangerous API, see the documentation of NoCreate for alternatives.
void Magnum:: GL:: CubeMapTextureArray:: 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 |
Layer is equivalent to layer * 6 + number of texture face, i.e. +X is 0
and so on, in order of (+X, -X, +Y, -Y, +Z, -Z).
void Magnum:: GL:: CubeMapTextureArray:: 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 |
CubeMapTextureArray& Magnum:: GL:: CubeMapTextureArray:: setBaseLevel(Int level)
Set base mip level.
Returns | Reference to self (for method chaining) |
---|
See Texture::
CubeMapTextureArray& Magnum:: GL:: CubeMapTextureArray:: setMaxLevel(Int level)
Set max mip level.
Returns | Reference to self (for method chaining) |
---|
See Texture::
CubeMapTextureArray& Magnum:: GL:: CubeMapTextureArray:: setMinificationFilter(SamplerFilter filter,
SamplerMipmap mipmap = SamplerMipmap:: Base)
Set minification filter.
Returns | Reference to self (for method chaining) |
---|
See Texture::
CubeMapTextureArray& Magnum:: GL:: CubeMapTextureArray:: 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.
CubeMapTextureArray& Magnum:: GL:: CubeMapTextureArray:: setMagnificationFilter(SamplerFilter filter)
Set magnification filter.
Returns | Reference to self (for method chaining) |
---|
See Texture::
CubeMapTextureArray& Magnum:: GL:: CubeMapTextureArray:: 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.
CubeMapTextureArray& Magnum:: GL:: CubeMapTextureArray:: setMinLod(Float lod)
Set the minimum level-of-detail.
Returns | Reference to self (for method chaining) |
---|
See Texture::
CubeMapTextureArray& Magnum:: GL:: CubeMapTextureArray:: setMaxLod(Float lod)
Set the maximum level-of-detail.
Returns | Reference to self (for method chaining) |
---|
See Texture::
CubeMapTextureArray& Magnum:: GL:: CubeMapTextureArray:: setLodBias(Float bias)
Set level-of-detail bias.
Returns | Reference to self (for method chaining) |
---|
See Texture::
CubeMapTextureArray& Magnum:: GL:: CubeMapTextureArray:: setWrapping(const Math:: Vector2<SamplerWrapping>& wrapping)
Set wrapping.
Returns | Reference to self (for method chaining) |
---|
See Texture::
CubeMapTextureArray& Magnum:: GL:: CubeMapTextureArray:: setWrapping(const Math:: Vector2<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.
CubeMapTextureArray& Magnum:: GL:: CubeMapTextureArray:: setWrapping(SamplerWrapping wrapping)
Set the same wrapping for all dimensions.
Returns | Reference to self (for method chaining) |
---|
Same as calling setWrapping(const Math::
CubeMapTextureArray& Magnum:: GL:: CubeMapTextureArray:: setWrapping(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.
CubeMapTextureArray& Magnum:: GL:: CubeMapTextureArray:: setBorderColor(const Color4& color)
Set border color.
Returns | Reference to self (for method chaining) |
---|
See Texture::
CubeMapTextureArray& Magnum:: GL:: CubeMapTextureArray:: setBorderColor(const Vector4ui& color)
Set border color for integer texture.
Returns | Reference to self (for method chaining) |
---|
See Texture::
CubeMapTextureArray& Magnum:: GL:: CubeMapTextureArray:: 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.
CubeMapTextureArray& Magnum:: GL:: CubeMapTextureArray:: setMaxAnisotropy(Float anisotropy)
Set max anisotropy.
Returns | Reference to self (for method chaining) |
---|
See Texture::
CubeMapTextureArray& Magnum:: GL:: CubeMapTextureArray:: setSrgbDecode(bool decode)
Set sRGB decoding.
Returns | Reference to self (for method chaining) |
---|
See Texture::
template<char r, char g, char b, char a>
CubeMapTextureArray& Magnum:: GL:: CubeMapTextureArray:: setSwizzle()
Set component swizzle.
Returns | Reference to self (for method chaining) |
---|
See Texture::
CubeMapTextureArray& Magnum:: GL:: CubeMapTextureArray:: setCompareMode(SamplerCompareMode mode)
Set depth texture comparison mode.
Returns | Reference to self (for method chaining) |
---|
See Texture::
CubeMapTextureArray& Magnum:: GL:: CubeMapTextureArray:: setCompareFunction(SamplerCompareFunction function)
Set depth texture comparison function.
Returns | Reference to self (for method chaining) |
---|
See Texture::
CubeMapTextureArray& Magnum:: GL:: CubeMapTextureArray:: setDepthStencilMode(SamplerDepthStencilMode mode)
Set depth/stencil texture mode.
Returns | Reference to self (for method chaining) |
---|
See Texture::
CubeMapTextureArray& Magnum:: GL:: CubeMapTextureArray:: setStorage(Int levels,
TextureFormat internalFormat,
const Vector3i& size)
Set storage.
Returns | Reference to self (for method chaining) |
---|
Z coordinate of size
must be multiple of 6.
See Texture::
Vector3i Magnum:: GL:: CubeMapTextureArray:: imageSize(Int level)
Image size in given mip level.
See Texture::
void Magnum:: GL:: CubeMapTextureArray:: image(Int level,
Image3D& image)
Read given texture mip level to an image.
Behavior mostly equivalent to Texture::image
get set to ImageFlag3D::
Image3D Magnum:: GL:: CubeMapTextureArray:: 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:: CubeMapTextureArray:: image(Int level,
const MutableImageView3D& image) new in 2019.10
Read given texture mip level to an image view.
Compared to image(Int, Image3D&) the function reads the pixels into the memory provided by image
, expecting it's not nullptr
and its size is the same as size of given level
. Any set of ImageFlags is allowed in image
— e.g., it's possible to read a cube map array texture to an image not marked as a cube map.
void Magnum:: GL:: CubeMapTextureArray:: image(Int level,
BufferImage3D& image,
BufferUsage usage)
Read given texture mip level to a buffer image.
See Texture::
BufferImage3D Magnum:: GL:: CubeMapTextureArray:: 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:: CubeMapTextureArray:: compressedImage(Int level,
CompressedImage3D& image)
Read given compressed texture mip level to an image.
Behavior mostly equivalent to Texture::image
get set to ImageFlag3D::
CompressedImage3D Magnum:: GL:: CubeMapTextureArray:: 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:: CubeMapTextureArray:: compressedImage(Int level,
const MutableCompressedImageView3D& image) new in 2019.10
Read given compressed texture mip level to an image view.
Compared to compressedImage(Int, CompressedImage3D&) the function reads the pixels into the memory provided by image
, expecting it's not nullptr
, its format is the same as texture format and its size is the same as size of given level
. Any set of ImageFlags is allowed in image
— e.g., it's possible to read a cube map array texture to an image not marked as a cube map.
void Magnum:: GL:: CubeMapTextureArray:: compressedImage(Int level,
CompressedBufferImage3D& image,
BufferUsage usage)
Read given compressed texture mip level to a buffer image.
See Texture::
CompressedBufferImage3D Magnum:: GL:: CubeMapTextureArray:: 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:: CubeMapTextureArray:: subImage(Int level,
const Range3Di& range,
Image3D& image)
Read a range of given texture mip level to an image.
Behavior mostly equivalent to Texture::image
get set to ImageFlag3D::
Image3D Magnum:: GL:: CubeMapTextureArray:: 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:: CubeMapTextureArray:: subImage(Int level,
const Range3Di& range,
const MutableImageView3D& image) new in 2019.10
Read a range of given texture mip level to an image view.
Compared to subImage(Int, const Range3Di&, Image3D&) the function reads the pixels into the memory provided by image
, expecting it's not nullptr
and its size is the same as range
size. Any set of ImageFlags is allowed in image
— e.g., it's possible to read a cube map array texture to an image not marked as a cube map.
void Magnum:: GL:: CubeMapTextureArray:: subImage(Int level,
const Range3Di& range,
BufferImage3D& image,
BufferUsage usage)
Read a range of given texture mip level to a buffer image.
See Texture::
BufferImage3D Magnum:: GL:: CubeMapTextureArray:: 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:: CubeMapTextureArray:: compressedSubImage(Int level,
const Range3Di& range,
CompressedImage3D& image)
Read a range of given compressed texture mip level to an image.
Behavior mostly equivalent to Texture::image
get set to ImageFlag3D::
CompressedImage3D Magnum:: GL:: CubeMapTextureArray:: 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:: CubeMapTextureArray:: compressedSubImage(Int level,
const Range3Di& range,
const MutableCompressedImageView3D& image) new in 2019.10
Read a range of given compressed texture mip level to an image view.
Compared to compressedSubImage(Int, const Range3Di&, CompressedImage3D&) the function reads the pixels into the memory provided by image
, expecting it's not nullptr
, its format is the same as texture format and its size is the same as range
size. Any set of ImageFlags is allowed in image
— e.g., it's possible to read a cube map array texture to an image not marked as a cube map.
void Magnum:: GL:: CubeMapTextureArray:: compressedSubImage(Int level,
const Range3Di& range,
CompressedBufferImage3D& image,
BufferUsage usage)
Read a range of given compressed texture mip level to a buffer image.
See Texture::
CompressedBufferImage3D Magnum:: GL:: CubeMapTextureArray:: 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);
CubeMapTextureArray& Magnum:: GL:: CubeMapTextureArray:: setImage(Int level,
TextureFormat internalFormat,
const ImageView3D& image)
Set image data.
Returns | Reference to self (for method chaining) |
---|
Sets texture image data from three-dimensional image for all cube faces for all layers. Each group of 6 2D images is one cube map layer, thus Z coordinate of image
size must be multiple of 6. The images are in order of (+X, -X, +Y, -Y, +Z, -Z). Any set of ImageFlags is allowed in image
— e.g., it's possible to upload an image marked as 2D array to a cube map array.
See Texture::
CubeMapTextureArray& Magnum:: GL:: CubeMapTextureArray:: setImage(Int level,
TextureFormat internalFormat,
BufferImage3D& image)
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
CubeMapTextureArray& Magnum:: GL:: CubeMapTextureArray:: setImage(Int level,
TextureFormat internalFormat,
BufferImage3D&& image)
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
CubeMapTextureArray& Magnum:: GL:: CubeMapTextureArray:: setCompressedImage(Int level,
const CompressedImageView3D& image)
Set compressed image data.
Returns | Reference to self (for method chaining) |
---|
Sets texture image data from three-dimensional image for all cube faces for all layers. Each group of 6 2D images is one cube map layer, thus Z coordinate of image
size must be multiple of 6. The images are in order of (+X, -X, +Y, -Y, +Z, -Z). Any set of ImageFlags is allowed in image
— e.g., it's possible to upload an image marked as 2D array to a cube map array.
See Texture::
CubeMapTextureArray& Magnum:: GL:: CubeMapTextureArray:: setCompressedImage(Int level,
CompressedBufferImage3D& image)
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
CubeMapTextureArray& Magnum:: GL:: CubeMapTextureArray:: setCompressedImage(Int level,
CompressedBufferImage3D&& image)
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
CubeMapTextureArray& Magnum:: GL:: CubeMapTextureArray:: setSubImage(Int level,
const Vector3i& offset,
const ImageView3D& image)
Set image subdata.
Returns | Reference to self (for method chaining) |
---|
Z coordinate is equivalent to layer * 6 + number of texture face, i.e. +X is 0
and so on, in order of (+X, -X, +Y, -Y, +Z, -Z). Any set of ImageFlags is allowed in image
— e.g., it's possible to upload an image marked as 2D array to a cube map array.
See Texture::
CubeMapTextureArray& Magnum:: GL:: CubeMapTextureArray:: 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.
CubeMapTextureArray& Magnum:: GL:: CubeMapTextureArray:: 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.
CubeMapTextureArray& Magnum:: GL:: CubeMapTextureArray:: setCompressedSubImage(Int level,
const Vector3i& offset,
const CompressedImageView3D& image)
Set compressed image subdata.
Returns | Reference to self (for method chaining) |
---|
Z coordinate is equivalent to layer * 6 + number of texture face, i.e. +X is 0
and so on, in order of (+X, -X, +Y, -Y, +Z, -Z). Any set of ImageFlags is allowed in image
— e.g., it's possible to upload an image marked as 2D array to a cube map array.
See Texture::
CubeMapTextureArray& Magnum:: GL:: CubeMapTextureArray:: 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.
CubeMapTextureArray& Magnum:: GL:: CubeMapTextureArray:: 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.
CubeMapTextureArray& Magnum:: GL:: CubeMapTextureArray:: generateMipmap()
Generate mipmap.
Returns | Reference to self (for method chaining) |
---|
See Texture::
void Magnum:: GL:: CubeMapTextureArray:: invalidateImage(Int level)
Invalidate texture image.
See Texture::
void Magnum:: GL:: CubeMapTextureArray:: invalidateSubImage(Int level,
const Vector3i& offset,
const Vector3i& size)
Invalidate texture subimage.
Z coordinate is equivalent to layer * 6 + number of texture face, i.e. +X is 0
and so on, in order of (+X, -X, +Y, -Y, +Z, -Z). Any set of ImageFlags is allowed in image
— e.g., it's possible to upload an image marked as 2D array to a cube map array.
See Texture::