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

Buffer view descriptor structure. More...

#include <BufferFlags.h>

Public Member Functions

 BufferViewDescriptor ()=default
 BufferViewDescriptor (Format format, std::uint64_t offset=0, std::uint64_t size=LLGL_WHOLE_SIZE)
 Initializes the descriptor with all or only some of the components.

Public Attributes

Format format = Format::Undefined
 Specifies the format of the buffer view. By default Format::Undefined.
std::uint64_t offset = 0
 Specifies the memory offset (in bytes) into the buffer resource. By default 0.
std::uint64_t size = LLGL_WHOLE_SIZE
 Specifies the memory offset (in bytes) into the buffer resource. By default LLGL_WHOLE_SIZE.

Detailed Description

Buffer view descriptor structure.

Remarks
Contains all information about format and memory range to create a buffer view that shares the data of another buffer resource.
See also
ResourceViewDescriptor::bufferView
RenderingFeatures::hasBufferViews

Constructor & Destructor Documentation

◆ BufferViewDescriptor() [1/2]

LLGL::BufferViewDescriptor::BufferViewDescriptor ( )
default

◆ BufferViewDescriptor() [2/2]

LLGL::BufferViewDescriptor::BufferViewDescriptor ( Format format,
std::uint64_t offset = 0,
std::uint64_t size = LLGL_WHOLE_SIZE )
inline

Initializes the descriptor with all or only some of the components.

Member Data Documentation

◆ format

Format LLGL::BufferViewDescriptor::format = Format::Undefined

Specifies the format of the buffer view. By default Format::Undefined.

Remarks
If the buffer resource was created with a stride greater than zero, this must be Format::Undefined.
See also
BufferDescriptor::format
BufferDescriptor::stride

◆ offset

std::uint64_t LLGL::BufferViewDescriptor::offset = 0

Specifies the memory offset (in bytes) into the buffer resource. By default 0.

Remarks
If size is equal to LLGL_WHOLE_SIZE, the offset is ignored and the entire buffer resource will be occupied by this buffer view.
If format is Format::Undefined, this must be aligned to the stride the buffer resource was created with.
If format is not Format::Undefined, this must be aligned to the size of format.
See also
RenderingLimits::minConstantBufferAlignment
RenderingLimits::minSampledBufferAlignment
RenderingLimits::minStorageBufferAlignment
GetFormatAttribs

◆ size

std::uint64_t LLGL::BufferViewDescriptor::size = LLGL_WHOLE_SIZE

Specifies the memory offset (in bytes) into the buffer resource. By default LLGL_WHOLE_SIZE.

Remarks
If size is LLGL_WHOLE_SIZE, then offset is ignored and the whole buffer range will be used.
If size is not LLGL_WHOLE_SIZE and format is Format::Undefined, this must be aligned to the stride the buffer resource was created with.
If size is not LLGL_WHOLE_SIZE and format is not Format::Undefined, this must be aligned to the size of format.
See also
RenderingLimits::minConstantBufferAlignment
RenderingLimits::minSampledBufferAlignment
RenderingLimits::minStorageBufferAlignment
GetFormatAttribs

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