RAII wrapper for an OpenGL VAO.
More...
#include <spk_vertex_array_object.hpp>
|
|
| VertexArrayObject () |
| | Builds an empty VAO wrapper.
|
| | VertexArrayObject (const VertexArrayObject &p_other) |
| | Copies VAO handle state from another wrapper.
|
| VertexArrayObject & | operator= (const VertexArrayObject &p_other) |
| | Copies VAO handle state from another wrapper.
|
| GLuint | id () const |
| | Retrieves the VAO id, creating it on-demand.
|
|
| ActivableObject () |
| | Builds a deactivated object.
|
| | ActivableObject (ActivationStatus p_initial) |
| | Builds with a custom initial activation state.
|
|
void | activate () |
| | Sets the state to Activated.
|
|
void | deactivate () |
| | Sets the state to Deactivated.
|
|
void | toggle () |
| | Toggles between activated and deactivated states.
|
| bool | isActive () const |
| | Checks whether the object is currently activated.
|
| Contract | addActivationCallback (const Job &p_callback) |
| | Registers a callback executed when the object activates.
|
| Contract | addDeactivationCallback (const Job &p_callback) |
| | Registers a callback executed when the object deactivates.
|
| | StatefulObject (const ActivationStatus &p_initialState) |
| | Builds with an initial state.
|
|
StatefulObject & | operator= (const StatefulObject &p_other)=delete |
| void | setState (const ActivationStatus &p_newState) |
| | Sets a new state and triggers callbacks registered for it.
|
| ActivationStatus | state () const |
| | Returns the current state.
|
| Contract | addCallback (const ActivationStatus &p_state, const Job &p_callback) |
| | Subscribes a callback for a specific state.
|
|
|
using | Contract = StatefulObject<ActivationStatus>::Contract |
| | Subscription handle controlling callback lifetime.
|
|
using | Job = StatefulObject<ActivationStatus>::Job |
| | Callback signature executed on activation state changes.
|
|
using | Contract |
| | Handle allowing subscribers to manage callback lifetimes.
|
|
using | Job |
| | Callable invoked when the object transitions to a state.
|
RAII wrapper for an OpenGL VAO.
- See also
- VAO
◆ VertexArrayObject()
| spk::OpenGL::VertexArrayObject::VertexArrayObject |
( |
const VertexArrayObject & | p_other | ) |
|
Copies VAO handle state from another wrapper.
- Parameters
-
◆ id()
| GLuint spk::OpenGL::VertexArrayObject::id |
( |
| ) |
const |
|
inline |
Retrieves the VAO id, creating it on-demand.
- Returns
- OpenGL VAO handle.
◆ operator=()
Copies VAO handle state from another wrapper.
- Parameters
-
- Returns
- Reference to this VAO wrapper.
The documentation for this class was generated from the following files: