PlottingOpenGL::GLBuffer
PlottingOpenGL::GLBuffer
RAII wrapper for a QOpenGLBuffer. More…
#include <GLContext.hpp>
Public Types
| Name | |
|---|---|
| enum class | Type { Vertex, Index} |
| enum class | Usage { StaticDraw, DynamicDraw, StreamDraw} |
Public Functions
| Name | |
|---|---|
| GLBuffer(Type type =Type::Vertex) | |
| ~GLBuffer() | |
| GLBuffer(GLBuffer const & ) =delete | |
| GLBuffer & | operator=(GLBuffer const & ) =delete |
| GLBuffer(GLBuffer && other) | |
| GLBuffer & | operator=(GLBuffer && other) |
| bool | create() |
| void | destroy() |
| bool | bind() |
| void | release() |
| void | allocate(void const * data, int size_bytes) |
| void | write(int offset, void const * data, int size_bytes) |
| bool | isCreated() const |
| int | size() const |
Detailed Description
class PlottingOpenGL::GLBuffer;RAII wrapper for a QOpenGLBuffer.
Ensures proper lifecycle management and provides a cleaner interface for batch renderer implementations.
Public Types Documentation
enum Type
| Enumerator | Value | Description |
|---|---|---|
| Vertex | ||
| Index |
enum Usage
| Enumerator | Value | Description |
|---|---|---|
| StaticDraw | ||
| DynamicDraw | ||
| StreamDraw |
Public Functions Documentation
function GLBuffer
explicit GLBuffer(
Type type =Type::Vertex
)function ~GLBuffer
~GLBuffer()function GLBuffer
GLBuffer(
GLBuffer const &
) =deletefunction operator=
GLBuffer & operator=(
GLBuffer const &
) =deletefunction GLBuffer
GLBuffer(
GLBuffer && other
)function operator=
GLBuffer & operator=(
GLBuffer && other
)function create
bool create()function destroy
void destroy()function bind
bool bind()function release
void release()function allocate
void allocate(
void const * data,
int size_bytes
)function write
void write(
int offset,
void const * data,
int size_bytes
)function isCreated
bool isCreated() constfunction size
int size() constUpdated on 2026-11-13 at 20:25:41 +0000