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 IBuffer * | pSrcBuffer = 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. | |
Describes data for one subresource.
|
inlineconstexprnoexcept |
Initializes the structure members with default values.
Default values:
Member | Default value |
---|---|
pData | nullptr |
SrcOffset | 0 |
Stride | 0 |
DepthStride | 0 |
Uint64 Diligent::TextureSubResData::DepthStride = 0 |
For 3D textures, depth slice stride in bytes.
On OpenGL, this must be a multiple of Stride
const void* Diligent::TextureSubResData::pData = nullptr |
Pointer to the subresource data in CPU memory.
If provided, pSrcBuffer
must be null
struct IBuffer* Diligent::TextureSubResData::pSrcBuffer = nullptr |
Pointer to the GPU buffer that contains subresource data.
If provided, pData
must be null
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