All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Pages
Luminous::VertexArrayGL Class Reference

This class represents the VertexArray in GPU memory. More...

#include <Luminous/VertexArrayGL.hpp>

Inheritance diagram for Luminous::VertexArrayGL:
Luminous::ResourceHandleGL

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 VertexArrayGLoperator= (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...
 
ResourceHandleGLoperator= (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.
 
StateGLm_state
 OpenGL state owned by the graphics driver.
 

Detailed Description

This class represents the VertexArray in GPU memory.

See Also
VertexArray

Constructor & Destructor Documentation

LUMINOUS_API Luminous::VertexArrayGL::VertexArrayGL ( StateGL state)

Constructor.

Parameters
stateOpenGL state
LUMINOUS_API Luminous::VertexArrayGL::VertexArrayGL ( VertexArrayGL &&  t)

Move constructor.

Parameters
tvertex array to move

Member Function Documentation

LUMINOUS_API int Luminous::VertexArrayGL::generation ( ) const
inline

Get the generation count of the vertex array.

This counter is used to keep the CPU and GPU objects synchronized.

Returns
generation count
LUMINOUS_API VertexArrayGL& Luminous::VertexArrayGL::operator= ( VertexArrayGL &&  t)

Move assignment operator.

Parameters
tvertex array to move
LUMINOUS_API void Luminous::VertexArrayGL::upload ( const VertexArray vertexArray,
ProgramGL program 
)

Upload he vertex array given specification to the GPU.

Parameters
vertexArrayvertex array
programshader program to use with the vertex array