This class abstracts OpenGL VertexArrayObjects. More...
#include <Luminous/VertexArray.hpp>
Classes | |
| struct | Binding |
| Stores vertex description and id of buffer containing vertices. More... | |
Public Member Functions | |
| LUMINOUS_API void | addBinding (const Luminous::Buffer &vertexBuffer, const Luminous::VertexDescription &description) |
| Adds binding for the given vertex buffer. More... | |
| LUMINOUS_API const Binding & | binding (size_t index) const |
| Returns binding according based on their ordering (first added binding has index 0, second 1, etc) More... | |
| LUMINOUS_API size_t | bindingCount () const |
| How many bindings is stored in this object. More... | |
| LUMINOUS_API void | clear () |
| Removes all bindings. | |
| LUMINOUS_API RenderResource::Id | indexBuffer () const |
| Returns index buffer of this vertex array. More... | |
| LUMINOUS_API VertexArray & | operator= (VertexArray &&b) |
| Move assignment operator. More... | |
| LUMINOUS_API void | removeBinding (const Luminous::Buffer &buffer) |
| Removes binding for the given buffer. More... | |
| LUMINOUS_API void | setIndexBuffer (const Luminous::Buffer &indexBuffer) |
| Sets index buffer for this vertex array. More... | |
| LUMINOUS_API | VertexArray () |
| Constructor of VertexArray. | |
| LUMINOUS_API | VertexArray (VertexArray &&b) |
| Move constructor. More... | |
| LUMINOUS_API | ~VertexArray () |
| Destroctor of VertexArray, doesn't destroy any buffers attached. | |
Public Member Functions inherited from Luminous::RenderResource | |
| unsigned int | expiration () const |
| Returns resource expiration time. More... | |
| int | generation () const |
| Returns generation of this resource. More... | |
| void | invalidate () |
| Invalidates correspondent GPU objects and forces uploading of data to GPU. | |
| RenderResource & | operator= (RenderResource &&rr) |
| Move assignment operator. More... | |
| RenderResource (Type type) | |
| Constructor of RenderResource. More... | |
| RenderResource (RenderResource &&rr) | |
| Move constructor. More... | |
| Id | resourceId () const |
| Returns identifier of resource. More... | |
| Type | resourceType () const |
| Returns type of the resource. More... | |
| void | setExpiration (unsigned int seconds) |
| Set resource expiration time. More... | |
| void | setGeneration (int generation) |
| Sets generation for this resource. More... | |
| virtual | ~RenderResource () |
| Destructor of RenderResource. | |
Additional Inherited Members | |
Public Types inherited from Luminous::RenderResource | |
| typedef uint64_t | Id |
| Id of a resource. | |
| enum | Type { VertexArray, Buffer, Program, Texture, RenderBuffer, FrameBuffer } |
| Different types of render resources. More... | |
Protected Member Functions inherited from Luminous::RenderResource | |
| RenderResource & | operator= (const RenderResource &rr) |
| Assignment operator. More... | |
| RenderResource (const RenderResource &rr) | |
| Copy constructor. More... | |
This class abstracts OpenGL VertexArrayObjects.
GPU correspondent of this class is VertexArrayGL
| LUMINOUS_API Luminous::VertexArray::VertexArray | ( | VertexArray && | b | ) |
Move constructor.
| b | VertexArray to move |
| LUMINOUS_API void Luminous::VertexArray::addBinding | ( | const Luminous::Buffer & | vertexBuffer, |
| const Luminous::VertexDescription & | description | ||
| ) |
Adds binding for the given vertex buffer.
| vertexBuffer | Vertex buffer which contains vertex data conforming to description |
| description | Description of vertex data in vertexBuffer |
| LUMINOUS_API const Binding& Luminous::VertexArray::binding | ( | size_t | index | ) | const |
Returns binding according based on their ordering (first added binding has index 0, second 1, etc)
| index | Index for the binding |
| LUMINOUS_API size_t Luminous::VertexArray::bindingCount | ( | ) | const |
How many bindings is stored in this object.
| LUMINOUS_API RenderResource::Id Luminous::VertexArray::indexBuffer | ( | ) | const |
Returns index buffer of this vertex array.
| LUMINOUS_API VertexArray& Luminous::VertexArray::operator= | ( | VertexArray && | b | ) |
Move assignment operator.
| b | VertexArrau to move |
| LUMINOUS_API void Luminous::VertexArray::removeBinding | ( | const Luminous::Buffer & | buffer | ) |
Removes binding for the given buffer.
| buffer | Buffer to remove |
| LUMINOUS_API void Luminous::VertexArray::setIndexBuffer | ( | const Luminous::Buffer & | indexBuffer | ) |
Sets index buffer for this vertex array.
| indexBuffer | Buffer storing indices |