|
| | VertexBufferObject (Usage p_usage) |
| | Constructs VBO with a usage hint.
|
| | VertexBufferObject (const VertexBufferObject &p_other) |
| | Copies GPU handle ownership and layout from another VBO.
|
| VertexBufferObject & | operator= (const VertexBufferObject &p_other) |
| | Copies GPU handle ownership and layout from another VBO.
|
| Layout & | layout () |
| | Access layout descriptor.
|
| const Layout & | layout () const |
| | Access layout descriptor.
|
| size_t | vertexCount () const |
| | Number of vertices based on current stride and size.
|
| template<typename TVertex> |
| std::vector< TVertex > | pull () const |
| | Downloads vertices from GPU memory.
|
| template<typename TVertex> |
| void | setVertices (const std::vector< TVertex > &p_vertices) |
| | Replaces buffer contents with provided vertices.
|
| template<typename TVertex> |
| void | setVertices (std::initializer_list< TVertex > p_vertices) |
| | Replaces buffer contents with initializer list of vertices.
|
| template<typename TVertex> |
| void | pushVertex (const TVertex &p_vertex) |
| | Appends a single vertex to the buffer.
|
| template<typename TVertex> |
| void | pushVertices (const std::vector< TVertex > &p_vertices) |
| | Appends multiple vertices to the buffer.
|
| template<typename TVertex> |
| void | pushVertices (std::initializer_list< TVertex > p_vertices) |
| | Appends vertices from an initializer list.
|
| template<typename TVertex> |
| std::span< TVertex > | vertices () |
| | Provides mutable access to the CPU-side vertex span.
|
| template<typename TVertex> |
| std::span< const TVertex > | vertices () const |
| | Provides immutable access to the CPU-side vertex span.
|
| | BufferObject (const Type &p_type, const Usage &p_usage) |
| | Constructs a buffer with target type and usage hint.
|
| | BufferObject (const BufferObject &p_other) |
| | Copies buffer configuration and staged content from another buffer.
|
| BufferObject & | operator= (const BufferObject &p_other) |
| | Copies buffer configuration and staged content from another buffer.
|
| void | reserve (size_t p_size) |
| | Reserves CPU-side storage without changing size.
|
| void | resize (size_t p_size) |
| | Resizes CPU-side buffer and marks for sync.
|
| void | swapData (std::vector< uint8_t > &p_data) |
| | Swaps CPU staging buffer with external vector.
|
| template<typename TType> |
| void | setData (const std::vector< TType > &p_data) |
| | Replaces buffer contents with a vector of trivially copyable values.
|
| template<typename TType> |
| void | setData (std::initializer_list< TType > p_data) |
| | Replaces buffer contents with an initializer list of values.
|
| void | setData (const void *p_data, size_t p_size) |
| | Replaces CPU buffer content with raw data.
|
| void | pushData (const void *p_data, size_t p_size) |
| | Appends raw data to CPU buffer.
|
| template<typename TType> |
| void | pushData (const TType &p_value) |
| | Appends a single trivially copyable value to the buffer.
|
| template<typename TType> |
| void | pushData (const std::vector< TType > &p_values) |
| | Appends a vector of trivially copyable values to the buffer.
|
| template<typename TType> |
| void | pushData (std::initializer_list< TType > p_values) |
| | Appends an initializer list of trivially copyable values to the buffer.
|
| void | editData (const void *p_data, size_t p_offset, size_t p_size) |
| | Overwrites a range of the CPU buffer.
|
| template<typename TType> |
| void | editData (const TType &p_value, size_t p_offset) |
| | Overwrites part of the buffer with a single value.
|
| size_t | size () const |
| | Returns the current CPU buffer size.
|
| Buffer & | buffer () |
| | Mutable access to the CPU staging buffer.
|
| const Buffer & | buffer () const |
| | Const access to the CPU staging buffer.
|
| Buffer::value_type * | data () |
| | Mutable pointer to underlying bytes.
|
| const Buffer::value_type * | data () const |
| | Const pointer to underlying bytes.
|
|
| 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.
|
|
void | requestSynchronization () noexcept |
| | Marks the object as needing synchronization.
|
| bool | needsSynchronization () const noexcept |
| | Checks if synchronization is pending.
|
|
void | synchronize () |
| | Performs synchronization if requested.
|
|
void | forceSynchronization () |
| | Forces synchronization regardless of current flag.
|
|
| enum class | Type : GLenum {
Unknow = GL_INVALID_ENUM
, Storage = GL_ARRAY_BUFFER
, Element = GL_ELEMENT_ARRAY_BUFFER
, Uniform = GL_UNIFORM_BUFFER
,
Texture = GL_TEXTURE_BUFFER
, TransformFeedback = GL_TRANSFORM_FEEDBACK_BUFFER
, ShaderStorage = GL_SHADER_STORAGE_BUFFER
, PixelPack = GL_PIXEL_PACK_BUFFER
,
PixelUnpack = GL_PIXEL_UNPACK_BUFFER
, DrawIndirect = GL_DRAW_INDIRECT_BUFFER
, AtomicCounter = GL_ATOMIC_COUNTER_BUFFER
} |
| | Supported OpenGL binding targets for buffer uploads.
|
| enum class | Usage : GLenum {
Unknow = GL_INVALID_ENUM
, Static = GL_STATIC_DRAW
, Dynamic = GL_DYNAMIC_DRAW
, Stream = GL_STREAM_DRAW
,
StaticRead = GL_STATIC_READ
, DynamicRead = GL_DYNAMIC_READ
, StreamRead = GL_STREAM_READ
, StaticCopy = GL_STATIC_COPY
,
DynamicCopy = GL_DYNAMIC_COPY
, StreamCopy = GL_STREAM_COPY
} |
| | Usage hints forwarded to the OpenGL driver.
|
|
using | Buffer = std::vector<uint8_t> |
| | CPU-side byte buffer used as staging before GPU upload.
|
|
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.
|
|
Type | _type |
| | Buffer target selected at construction.
|
|
Usage | _usage |
| | Driver usage hint selected at construction.
|
|
spk::CachedData< GLuint > | _id |
| | Lazily created GPU buffer identifier.
|
|
size_t | _gpuCapacity = 0 |
| | Capacity reserved on the GPU for the current buffer.
|
|
Buffer | _content |
| | CPU staging area mirrored to GPU on synchronization.
|
Convenience wrapper for array buffers with vertex layout management.
- See also
- VertexBufferObject::Layout, BufferSetObject