LLGL 0.05 Beta
Loading...
Searching...
No Matches
LLGL::TextureRegion Struct Reference

Texture region structure: Subresource (MIP-map level and array layer range), offset, and extent. More...

#include <TextureFlags.h>

Public Member Functions

 TextureRegion ()=default
 TextureRegion (const Offset3D &offset, const Extent3D &extent)
 Constructor to initialize offset and extent only.
 TextureRegion (const TextureSubresource &subresource, const Offset3D &offset, const Extent3D &extent)
 Constructor to initialize all members.

Public Attributes

TextureSubresource subresource
 Specifies the texture subresource, i.e. MIP-map level and array layer range. By default only the first MIP-map level and first array layer is addressed.
Offset3D offset
 Zero-based offset within the texture data.
Extent3D extent
 Extent of the sub texture region.

Detailed Description

Texture region structure: Subresource (MIP-map level and array layer range), offset, and extent.

Remarks
This is used to write (or partially write) and read (or partially read) the image data of a single texture MIP-map level.
See also
RenderSystem::WriteTexture
RenderSystem::ReadTexture
CommandBuffer::CopyBufferFromTexture
CommandBuffer::CopyTextureFromBuffer
TextureLocation

Constructor & Destructor Documentation

◆ TextureRegion() [1/3]

LLGL::TextureRegion::TextureRegion ( )
default

◆ TextureRegion() [2/3]

LLGL::TextureRegion::TextureRegion ( const Offset3D & offset,
const Extent3D & extent )
inline

Constructor to initialize offset and extent only.

◆ TextureRegion() [3/3]

LLGL::TextureRegion::TextureRegion ( const TextureSubresource & subresource,
const Offset3D & offset,
const Extent3D & extent )
inline

Constructor to initialize all members.

Member Data Documentation

◆ extent

Extent3D LLGL::TextureRegion::extent

Extent of the sub texture region.

Remarks
All components of the extent must be greater than zero. By default (0, 0, 0).
See also
TextureDescriptor::extent

◆ offset

Offset3D LLGL::TextureRegion::offset

Zero-based offset within the texture data.

Remarks
Any component of this field that is not meant for the respective texture type is ignored. All other components must be greater than or equal to zero.

◆ subresource

TextureSubresource LLGL::TextureRegion::subresource

Specifies the texture subresource, i.e. MIP-map level and array layer range. By default only the first MIP-map level and first array layer is addressed.

Remarks
For texture regions, numMipLevels of the TextureSubresource structure must always be 1, i.e. texture regions can only select a single MIP-map at a time.
See also
TextureSubresource::numMipLevels

The documentation for this struct was generated from the following file: