SimpleGL  1.1.0
A framework for platform independent rendering
Public Member Functions | List of all members
sgl::VertexArray Class Reference

This class wraps an OpenGL vertex array object. More...

#include <vertex_array_object.hpp>

Public Member Functions

 VertexArray (void)
 Generates a new vertex array object. More...
 
 ~VertexArray (void)
 Deletes the vertex array object. More...
 
GLuint getHandle ()
 Returns the handle of the vertex array object. More...
 
void bind ()
 Binds the vertex array object. More...
 
void enableAttribute (unsigned int index)
 Enables a vertex attribute. More...
 
void disableAttribute (unsigned int index)
 Disables a vertex attribute. More...
 
void pointAttribute (unsigned int index, int size, ValueType type, bool normalized, int stride, long offset)
 Sets the vertex attribute pointer. More...
 

Detailed Description

This class wraps an OpenGL vertex array object.

Definition at line 54 of file vertex_array_object.hpp.

Constructor & Destructor Documentation

sgl::VertexArray::VertexArray ( void  )

Generates a new vertex array object.

Definition at line 15 of file vertex_array_object.cpp.

sgl::VertexArray::~VertexArray ( void  )

Deletes the vertex array object.

Definition at line 19 of file vertex_array_object.cpp.

Member Function Documentation

void sgl::VertexArray::bind ( )

Binds the vertex array object.

Definition at line 32 of file vertex_array_object.cpp.

void sgl::VertexArray::disableAttribute ( unsigned int  index)

Disables a vertex attribute.

Parameters
indexLocation value of the attribute.

Definition at line 47 of file vertex_array_object.cpp.

void sgl::VertexArray::enableAttribute ( unsigned int  index)

Enables a vertex attribute.

Parameters
indexLocation value of the attribute.

Definition at line 43 of file vertex_array_object.cpp.

GLuint sgl::VertexArray::getHandle ( )

Returns the handle of the vertex array object.

Returns
The handle of the vertex array object.

Definition at line 28 of file vertex_array_object.cpp.

void sgl::VertexArray::pointAttribute ( unsigned int  index,
int  size,
ValueType  type,
bool  normalized,
int  stride,
long  offset 
)

Sets the vertex attribute pointer.

Parameters
indexLocation value of the attribute.
sizeNumber of values per vertex.
typeType of the value.
normalizedSpecifies if fixed-point data values should be normalized.
strideOffset between consecutive generic vertex attributes in bytes.
offsetOffset of the first component of the first generic vertex attribute in bytes.

Definition at line 51 of file vertex_array_object.cpp.


The documentation for this class was generated from the following files: