|
Aeon Engine c550894
AeonGames Open Source Game Engine
|
OpenGL GPU buffer wrapper implementing the Buffer interface. More...
#include <C:/Code/AeonEngine/engine/renderers/opengl/OpenGLBuffer.hpp>


Public Member Functions | |
| OpenGLBuffer (const GLsizei aSize, const GLenum aUsage, const void *aData=nullptr) | |
| Construct from size, usage hint, and optional initial data. | |
| OpenGLBuffer (OpenGLBuffer &&aOpenGLBuffer) | |
| Move constructor. | |
| OpenGLBuffer (const OpenGLBuffer &aOpenGLBuffer)=delete | |
| OpenGLBuffer & | operator= (const OpenGLBuffer &aOpenGLBuffer)=delete |
| OpenGLBuffer & | operator= (OpenGLBuffer &&aOpenGLBuffer)=delete |
| void | Initialize (const GLsizei aSize, const GLenum aUsage, const void *aData=nullptr) |
| Initialize the buffer with the given size, usage, and optional data. | |
| void | Finalize () |
| Release the buffer resources. | |
| void * | Map (const GLbitfield aAccess) const |
| Map the entire buffer with the specified access flags. | |
| void * | MapRange (const GLintptr aOffset, const GLsizeiptr aSize, const GLbitfield aAccess) const |
| Map a sub-range of the buffer. | |
| GLuint | GetBufferId () const |
| Get the OpenGL buffer object identifier. | |
Virtual functions | |
| void | WriteMemory (const size_t aOffset, const size_t aSize, const void *aData=nullptr) const final |
| Write data into the buffer at a given offset. | |
| void * | Map (const size_t aOffset, size_t aSize) const final |
| Map a region of the buffer into CPU-accessible memory. | |
| void | Unmap () const final |
| Unmap a previously mapped buffer region. | |
| size_t | GetSize () const final |
| Get the total size of the buffer in bytes. | |
OpenGL GPU buffer wrapper implementing the Buffer interface.
Definition at line 26 of file OpenGLBuffer.hpp.
| AeonGames::OpenGLBuffer::OpenGLBuffer | ( | const GLsizei | aSize, |
| const GLenum | aUsage, | ||
| const void * | aData = nullptr ) |
Construct from size, usage hint, and optional initial data.
Definition at line 26 of file OpenGLBuffer.cpp.
| AeonGames::OpenGLBuffer::OpenGLBuffer | ( | OpenGLBuffer && | aOpenGLBuffer | ) |
Move constructor.
Definition at line 45 of file OpenGLBuffer.cpp.
| AeonGames::OpenGLBuffer::~OpenGLBuffer | ( | ) |
Definition at line 40 of file OpenGLBuffer.cpp.
| void AeonGames::OpenGLBuffer::Finalize | ( | ) |
Release the buffer resources.
Definition at line 118 of file OpenGLBuffer.cpp.
| GLuint AeonGames::OpenGLBuffer::GetBufferId | ( | ) | const |
Get the OpenGL buffer object identifier.
Definition at line 52 of file OpenGLBuffer.cpp.
|
finalvirtual |
Get the total size of the buffer in bytes.
Implements AeonGames::Buffer.
Definition at line 100 of file OpenGLBuffer.cpp.
| void AeonGames::OpenGLBuffer::Initialize | ( | const GLsizei | aSize, |
| const GLenum | aUsage, | ||
| const void * | aData = nullptr ) |
Initialize the buffer with the given size, usage, and optional data.
Definition at line 57 of file OpenGLBuffer.cpp.
| void * AeonGames::OpenGLBuffer::Map | ( | const GLbitfield | aAccess | ) | const |
Map the entire buffer with the specified access flags.
Definition at line 76 of file OpenGLBuffer.cpp.
|
finalvirtual |
Map a region of the buffer into CPU-accessible memory.
| aOffset | Byte offset of the region to map. |
| aSize | Number of bytes to map. |
Implements AeonGames::Buffer.
Definition at line 83 of file OpenGLBuffer.cpp.
| void * AeonGames::OpenGLBuffer::MapRange | ( | const GLintptr | aOffset, |
| const GLsizeiptr | aSize, | ||
| const GLbitfield | aAccess ) const |
Map a sub-range of the buffer.
Definition at line 87 of file OpenGLBuffer.cpp.
|
finalvirtual |
Unmap a previously mapped buffer region.
Implements AeonGames::Buffer.
Definition at line 94 of file OpenGLBuffer.cpp.
|
finalvirtual |
Write data into the buffer at a given offset.
| aOffset | Byte offset into the buffer to begin writing. |
| aSize | Number of bytes to write. |
| aData | Pointer to the source data, or nullptr to clear. |
Implements AeonGames::Buffer.
Definition at line 64 of file OpenGLBuffer.cpp.