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
 Pointer to the subresource data in CPU memory.
 
struct IBufferpSrcBuffer = nullptr
 Pointer to the GPU buffer that contains subresource data.
 
Uint64 SrcOffset = 0
 
Uint64 Stride = 0
 For 2D and 3D textures, row stride in bytes.
 
Uint64 DepthStride = 0
 For 3D textures, depth slice stride in bytes.
 

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

For 3D textures, depth slice stride in bytes.

On OpenGL, this 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 subresource data.

If provided, pData must be null

◆ SrcOffset

Uint64 Diligent::TextureSubResData::SrcOffset = 0

When updating data from the buffer (pSrcBuffer is not null), offset from the beginning of the buffer to the data start