This class represents the VertexArray in GPU memory. More...
#include <Luminous/VertexArrayGL.hpp>
Public Member Functions | |
| LUMINOUS_API void | bind () |
| Bind the vertex array. | |
| LUMINOUS_API int | generation () const |
| Get the generation count of the vertex array. More... | |
| LUMINOUS_API VertexArrayGL & | operator= (VertexArrayGL &&t) |
| Move assignment operator. More... | |
| LUMINOUS_API void | unbind () |
| Unbind the vertex array. | |
| LUMINOUS_API void | upload (const VertexArray &vertexArray, ProgramGL *program) |
| Upload he vertex array given specification to the GPU. More... | |
| LUMINOUS_API | VertexArrayGL (StateGL &state) |
| Constructor. More... | |
| LUMINOUS_API | VertexArrayGL (VertexArrayGL &&t) |
| Move constructor. More... | |
| LUMINOUS_API | ~VertexArrayGL () |
| Destructor. | |
Public Member Functions inherited from Luminous::ResourceHandleGL | |
| bool | expired () const |
| Check if the resource has expired. More... | |
| GLuint | handle () const |
| Get the raw OpenGL handle for the resource. More... | |
| ResourceHandleGL & | operator= (ResourceHandleGL &&r) |
| Move assignment operator. More... | |
| ResourceHandleGL (StateGL &state) | |
| Constructor. More... | |
| ResourceHandleGL (ResourceHandleGL &&r) | |
| Move constructor. More... | |
| void | setExpirationSeconds (unsigned int secs) |
| Set the expiration time in seconds for the resource. More... | |
| void | touch () |
| Update the last used timestamp to current frame-time. More... | |
Additional Inherited Members | |
Protected Attributes inherited from Luminous::ResourceHandleGL | |
| GLuint | m_handle |
| Raw OpenGL handle of the resource. | |
| StateGL & | m_state |
| OpenGL state owned by the graphics driver. | |
This class represents the VertexArray in GPU memory.
| LUMINOUS_API Luminous::VertexArrayGL::VertexArrayGL | ( | StateGL & | state | ) |
Constructor.
| state | OpenGL state |
| LUMINOUS_API Luminous::VertexArrayGL::VertexArrayGL | ( | VertexArrayGL && | t | ) |
Move constructor.
| t | vertex array to move |
|
inline |
Get the generation count of the vertex array.
This counter is used to keep the CPU and GPU objects synchronized.
| LUMINOUS_API VertexArrayGL& Luminous::VertexArrayGL::operator= | ( | VertexArrayGL && | t | ) |
Move assignment operator.
| t | vertex array to move |
| LUMINOUS_API void Luminous::VertexArrayGL::upload | ( | const VertexArray & | vertexArray, |
| ProgramGL * | program | ||
| ) |
Upload he vertex array given specification to the GPU.
| vertexArray | vertex array |
| program | shader program to use with the vertex array |