Diligent Engine
 
Loading...
Searching...
No Matches
Diligent::TextureSubResData Struct Reference

Describes data for one subresource. More...

#include <Texture.h>

Public Member Functions

constexpr TextureSubResData () noexcept
 Initializes the structure members with default values.
 
constexpr TextureSubResData (const void *_pData, Uint64 _Stride, Uint64 _DepthStride=0) noexcept
 Initializes the structure members to perform copy from the CPU memory.
 
constexpr TextureSubResData (IBuffer *_pBuffer, Uint64 _SrcOffset, Uint64 _Stride, Uint64 _DepthStride=0) noexcept
 Initializes the structure members to perform copy from the GPU buffer.
 

Public Attributes

const void * pData = nullptr
 
struct IBufferpSrcBuffer = nullptr
 
Uint64 SrcOffset = 0
 
Uint64 Stride = 0
 
Uint64 DepthStride = 0
 

Detailed Description

Describes data for one subresource.

Constructor & Destructor Documentation

◆ TextureSubResData()

Diligent::TextureSubResData::TextureSubResData ( )
inlineconstexprnoexcept

Initializes the structure members with default values.

Default values:

Member Default value
pData nullptr
SrcOffset 0
Stride 0
DepthStride 0

Member Data Documentation

◆ DepthStride

Uint64 Diligent::TextureSubResData::DepthStride = 0

Depth slice stride, in bytes, for 3D textures.

On OpenGL, this value must be a multiple of Stride.

◆ pData

const void* Diligent::TextureSubResData::pData = nullptr

Pointer to the subresource data in CPU memory.

If provided, pSrcBuffer must be null.

◆ pSrcBuffer

struct IBuffer* Diligent::TextureSubResData::pSrcBuffer = nullptr

Pointer to the GPU buffer that contains the subresource data.

If provided, pData must be null.

◆ SrcOffset

Uint64 Diligent::TextureSubResData::SrcOffset = 0

If pSrcBuffer is not null, offset, in bytes, from the beginning of the source buffer to the subresource data.

This value must be a multiple of BufferProperties::TextureUpdateOffsetAlignment, which can be queried through IRenderDevice::GetAdapterInfo().

◆ Stride

Uint64 Diligent::TextureSubResData::Stride = 0

Row stride, in bytes, for 2D and 3D textures.

When pSrcBuffer is not null, this value must be a multiple of BufferProperties::TextureUpdateStrideAlignment, which can be queried through IRenderDevice::GetAdapterInfo().