![]() |
galaxy 1.0.0
Real-Time C++23 Game Programming Framework. Built on data-driven design principles and agile software engineering.
|
Modern SSBO abstraction. More...
#include <ShaderStorageBuffer.hpp>
Collaboration diagram for galaxy::ShaderStorageBuffer:Public Member Functions | |
| ShaderStorageBuffer (const int index) | |
| Constructor. | |
| ShaderStorageBuffer (ShaderStorageBuffer &&) noexcept | |
| Move constructor. | |
| ShaderStorageBuffer & | operator= (ShaderStorageBuffer &&) noexcept |
| Move assignment operator. | |
| ~ShaderStorageBuffer () | |
| Destructor. | |
| template<typename Object > | |
| void | buffer (const unsigned int count, Object *data) |
| Buffer data. | |
| template<typename Object > | |
| void | sub_buffer (const unsigned int offset, const unsigned int count, Object *data) |
| Sub buffer data. | |
| void | bind () const |
| Bind buffer. | |
| void | unbind () const |
| Unbind buffer. | |
| void | clear () const |
| Clears data from buffer. | |
| void | destroy () |
| Destroy shader. | |
| unsigned int | id () const noexcept |
| Get OpenGL handle. | |
Private Member Functions | |
| ShaderStorageBuffer ()=delete | |
| Default constructor. | |
| ShaderStorageBuffer (const ShaderStorageBuffer &)=delete | |
| Copy constructor. | |
| ShaderStorageBuffer & | operator= (const ShaderStorageBuffer &)=delete |
| Copy assignment operator. | |
Private Attributes | |
| unsigned int | m_id |
| OpenGL handle. | |
| int | m_index |
| Index binding of SSBO in vertex shader. | |
Modern SSBO abstraction.
https://ktstephano.github.io/rendering/opengl/ssbos
Definition at line 20 of file ShaderStorageBuffer.hpp.
| galaxy::ShaderStorageBuffer::ShaderStorageBuffer | ( | const int | index | ) |
Constructor.
| index | Index binding that needs to match in vertex shader. |
Definition at line 12 of file ShaderStorageBuffer.cpp.
|
noexcept |
Move constructor.
Definition at line 19 of file ShaderStorageBuffer.cpp.
| galaxy::ShaderStorageBuffer::~ShaderStorageBuffer | ( | ) |
Destructor.
Definition at line 44 of file ShaderStorageBuffer.cpp.
Here is the call graph for this function:
|
privatedelete |
Default constructor.
|
privatedelete |
Copy constructor.
|
noexcept |
Move assignment operator.
Definition at line 29 of file ShaderStorageBuffer.cpp.
|
inline |
Buffer data.
| Object | The data structure to use with this buffer. |
| count | Number of objects in data. |
| data | Pointer to the data to buffer. |
Definition at line 125 of file ShaderStorageBuffer.hpp.
Here is the call graph for this function:
Here is the caller graph for this function:
|
inline |
Sub buffer data.
| Object | The data structure to use with this buffer. |
| offset | Offset to start adding buffer from. |
| count | Number of objects in data. |
| data | Pointer to the data to buffer. |
Definition at line 134 of file ShaderStorageBuffer.hpp.
Here is the caller graph for this function:| void galaxy::ShaderStorageBuffer::bind | ( | ) | const |
Bind buffer.
Definition at line 49 of file ShaderStorageBuffer.cpp.
Here is the caller graph for this function:| void galaxy::ShaderStorageBuffer::unbind | ( | ) | const |
Unbind buffer.
Definition at line 54 of file ShaderStorageBuffer.cpp.
Here is the caller graph for this function:| void galaxy::ShaderStorageBuffer::clear | ( | ) | const |
Clears data from buffer.
Definition at line 59 of file ShaderStorageBuffer.cpp.
Here is the caller graph for this function:| void galaxy::ShaderStorageBuffer::destroy | ( | ) |
Destroy shader.
Definition at line 67 of file ShaderStorageBuffer.cpp.
Here is the caller graph for this function:
|
nodiscardnoexcept |
Get OpenGL handle.
Definition at line 76 of file ShaderStorageBuffer.cpp.
Here is the caller graph for this function:
|
privatedelete |
Copy assignment operator.
|
private |
OpenGL handle.
Definition at line 116 of file ShaderStorageBuffer.hpp.
|
private |
Index binding of SSBO in vertex shader.
Definition at line 121 of file ShaderStorageBuffer.hpp.