Overte C++ Documentation
gpu::StructBuffer< T > Class Template Reference

A buffer contaning a single structure. More...

#include <Buffer.h>

Inherits gpu::BufferView.

Public Member Functions

T & edit ()
 Mark data as dirty and get a writeable reference to the stored structure. More...
 
const T & get () const
 

Static Public Member Functions

template<class U >
static BufferPointer makeBuffer (uint32_t usage=gpu::Buffer::UniformBuffer)
 Creates a new buffer containing a give structure. More...
 

Detailed Description

template<class T>
class gpu::StructBuffer< T >

A buffer contaning a single structure.

Typically used for uniforms.

Template Parameters
TType of the structure that the buffer contains.

Member Function Documentation

◆ edit()

template<class T >
T& gpu::StructBuffer< T >::edit ( )
inline

Mark data as dirty and get a writeable reference to the stored structure.

Returns
Writeable reference to the stored structure.

◆ get()

template<class T >
const T& gpu::StructBuffer< T >::get ( ) const
inline
Returns
Read-only reference to the stored structure.

◆ makeBuffer()

template<class T >
template<class U >
static BufferPointer gpu::StructBuffer< T >::makeBuffer ( uint32_t  usage = gpu::Buffer::UniformBuffer)
inlinestatic

Creates a new buffer containing a give structure.

Typically used for uniforms.

Template Parameters
UType of the structure that the buffer contains.
Parameters
usageA bit sum of Buffer::Usage flags describing this buffer.
Returns
Shared pointer to the created buffer.

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