Class to store data arrays. Arrays can be later accessed by shaders when draw is requested.
More...
|
|
| ArrayObject (size_t vertex_count) |
| | Creates new object. Defined vertex count is expected for a setters of this instance.
|
| |
|
| ~ArrayObject () |
| | Destructs array object and frees all allocated OpenGL buffers.
|
| |
|
uint64_t | GetVertexCount () const |
| | Returns number of vertices expected by this instance.
|
| |
|
void | Bind () const |
| | Binds this ArrayObject. Needs to be called before any changes and drawings are performed with this object.
|
| |
|
void | Unbind () const |
| | Unbinds this ArrayObject.
|
| |
|
bool | IsBound () const |
| | Returns, whether this ArrayObject is currently bound.
|
| |
|
BufferName | AddBuffer (const void *data, size_t per_vert_size, DataUsage usage=DataUsage::dynamic_draw) |
| | Creates new buffer in graphic memory, and fills it with data. Parameter per_vert_size defines data memory size (in bytes) for each vertex.
|
| |
|
void | SetBuffer (BufferName vert_buffer, const void *data, size_t per_vert_size) |
| | Replaces data in existing buffer.
|
| |
|
bool | IsBufferValid (BufferName vert_buffer) const |
| | Checks whether specified buffer name belongs to valid buffer.
|
| |
|
void | SetBinding (const Attrib &att, uint32_t shader_location, BufferName buffer) |
| | Creates shader binding for specified buffer. Attribute parameter defines how are data structured inside buffer.
|
| |
|
BufferName | GetBinding (uint32_t shader_location) const |
| | Return the name of buffer that is bound to shader location. If no such buffer exists, returns INVALID_NAME.
|
| |
|
bool | ExistsBinding (uint32_t shader_location) const |
| | Check if there is binding for a shader location;.
|
| |
|
BufferName | AddBufferBinding1f (uint32_t shader_location, const void *data) |
| | Creates new buffer and sets shader binding. This function replaces call of SetBuffer and SetBinding with Attrib1f parameter.
|
| |
|
BufferName | AddBufferBinding2f (uint32_t shader_location, const void *data) |
| | Creates new buffer and sets shader binding. This function replaces call of SetBuffer and SetBinding with Attrib2f parameter.
|
| |
|
BufferName | AddBufferBinding3f (uint32_t shader_location, const void *data) |
| | Creates new buffer and sets shader binding. This function replaces call of SetBuffer and SetBinding with Attrib3f parameter.
|
| |
|
BufferName | AddBufferBinding4f (uint32_t shader_location, const void *data) |
| | Creates new buffer and sets shader binding. This function replaces call of SetBuffer and SetBinding with Attrib4f parameter.
|
| |
|
BufferName | AddBufferBinding1i (uint32_t shader_location, const void *data) |
| | Creates new buffer and sets shader binding. This function replaces call of SetBuffer and SetBinding with Attrib1i parameter.
|
| |
|
BufferName | AddBufferBinding2i (uint32_t shader_location, const void *data) |
| | Creates new buffer and sets shader binding. This function replaces call of SetBuffer and SetBinding with Attrib2i parameter.
|
| |
|
BufferName | AddBufferBinding3i (uint32_t shader_location, const void *data) |
| | Creates new buffer and sets shader binding. This function replaces call of SetBuffer and SetBinding with Attrib3i parameter.
|
| |
|
BufferName | AddBufferBinding4i (uint32_t shader_location, const void *data) |
| | Creates new buffer and sets shader binding. This function replaces call of SetBuffer and SetBinding with Attrib4i parameter.
|
| |
|
ElementBufferName | AddElementBuffer (const uint32_t *data, size_t count) |
| | Creates new element buffer which defines how primitives are structured.
|
| |
|
void | SetDrawMode (DrawMode mode) |
| | Set default drawing mode used when calling pure Draw or DrawInstanced functions. Default value is DrawMode::points.
|
| |
|
void | Draw () const |
| | Draws vertices or first defined elements. Default draw mode set by function SetDrawMode.
|
| |
|
void | DrawInstanced (uint32_t instance_count) const |
| | Draws vertices or first defined elements multiple times. Default draw mode set by function SetDrawMode.
|
| |
|
void | DrawVertices (DrawMode mode) const |
| | Draws vertices from buffer arrays.
|
| |
|
void | DrawVertices (size_t num_vertices, DrawMode mode) const |
| | Draws vertices from buffer arrays, the number of vertices drawn is num_vertices or vao vertex count, whichever is smaller.
|
| |
|
void | DrawVerticesInstanced (uint32_t instance_count, DrawMode mode) const |
| | Draws vertices from buffer arrays multiple times.
|
| |
|
void | DrawElements (ElementBufferName el_buff, DrawMode mode) const |
| | Draws elements specified element buffer.
|
| |
|
void | DrawElementsInstanced (uint32_t instance_count, ElementBufferName el_buff, DrawMode mode) const |
| | Draws elements specified element buffer multiple times.
|
| |
Class to store data arrays. Arrays can be later accessed by shaders when draw is requested.