|
GREM 3.12.0
Game/Rendering Engine Modules for C++
|
GPU memory buffer containing a fixed-size struct of uniform parameters to be read by a shader program. More...
#include <GREM/graphics/buffers.hpp>

Public Types | |
| using | parameters_type = ParameterStruct |
| Parameter struct type of the buffer. | |
Public Member Functions | |
| UniformBuffer (Device &device) | |
| Create a new buffer set up to contain the specified parameters, starting with uninitialized values. | |
| void | upload (const ParameterStruct &newParameterValues) |
| Upload new parameter values to the buffer for the next shader invocation that reads from it. | |
Static Public Attributes | |
| static constexpr UniformBufferLayout< ParameterStruct, Name > | LAYOUT {} |
| Layout of the buffer. | |
| static constexpr BufferLayoutReference | LAYOUT_REFERENCE = static_cast<UniformBufferLayoutReference>(LAYOUT) |
| Type-erased reference to the layout of the buffer. | |
| static constexpr CStringView | NAME = Name |
| Name of the buffer. | |
GPU memory buffer containing a fixed-size struct of uniform parameters to be read by a shader program.
| ParameterStruct | user-defined aggregate type of parameters that the buffer should contain. |
| Name | name of the uniform buffer. Must be globally unique among all buffer type instantiations. |
| using grem::graphics::UniformBuffer< ParameterStruct, Name >::parameters_type = ParameterStruct |
Parameter struct type of the buffer.
|
inlineexplicit |
Create a new buffer set up to contain the specified parameters, starting with uninitialized values.
| device | device to create the buffer for. Must outlive the buffer. |
| graphics::Error | if resource creation failed. |
| std::length_error | if an internal size limit was exceeded. |
| std::bad_array_new_length | if an internal size limit was exceeded. |
| std::bad_alloc | on allocation failure. |
|
inline |
Upload new parameter values to the buffer for the next shader invocation that reads from it.
| newParameterValues | new parameter values to upload. |
| graphics::Error | if resource creation failed. |
| std::length_error | if an internal size limit was exceeded. |
| std::bad_array_new_length | if an internal size limit was exceeded. |
| std::bad_alloc | on allocation failure. |
|
staticconstexpr |
Layout of the buffer.
|
staticconstexpr |
Type-erased reference to the layout of the buffer.
|
staticconstexpr |
Name of the buffer.