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

Vertex buffer view structure for buffer array initialization. More...

#include <BufferFlags.h>

Public Member Functions

 VertexBufferView ()=default
 VertexBufferView (Buffer *buffer, std::uint32_t stride=0, std::uint64_t offset=0)
 Initializes all fields of this structure.

Public Attributes

Buffer * buffer = nullptr
 Specifies the buffer resource for this vertex buffer view.
std::uint32_t stride = 0
 Specifies the stride (in bytes) between vertices.
std::uint64_t offset = 0
 Specifies the base offset (in bytes) relative to the beginning of the buffer.

Detailed Description

Vertex buffer view structure for buffer array initialization.

See also
RenderSystem::CreateBufferArray
CommandBuffer::SetVertexBuffers

Constructor & Destructor Documentation

◆ VertexBufferView() [1/2]

LLGL::VertexBufferView::VertexBufferView ( )
default

◆ VertexBufferView() [2/2]

LLGL::VertexBufferView::VertexBufferView ( Buffer * buffer,
std::uint32_t stride = 0,
std::uint64_t offset = 0 )
inline

Initializes all fields of this structure.

Parameters
[in]bufferPointer to the vertex buffer resource.
[in]strideOptional stride (in bytes) between vertices. If this is 0, the buffer resource must have been created with a default stride.

Member Data Documentation

◆ buffer

Buffer* LLGL::VertexBufferView::buffer = nullptr

Specifies the buffer resource for this vertex buffer view.

Remarks
This buffer must not be null and must have been created with the binding flag BindFlags::VertexBuffer.

◆ offset

std::uint64_t LLGL::VertexBufferView::offset = 0

Specifies the base offset (in bytes) relative to the beginning of the buffer.

Remarks
This will be added to each vertex attribute offset.
See also
SetVertexBuffer(Buffer&, std::uint32_t, std::uint64_t)

◆ stride

std::uint32_t LLGL::VertexBufferView::stride = 0

Specifies the stride (in bytes) between vertices.

Remarks
If this is zero, the buffer resource must have been created with a default stride.
If this is non-zero, this value must match the stride of the vertex attribute referencing this buffer slot in the active graphics PSO.
See also
BufferDescriptor::stride

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