zMol
A viewer for molecular data using OpenGL and ambient occlusion
Public Member Functions
zmol::vertex_array_object Class Reference

#include <vertex_array_object.hpp>

Inherits zmol::noncopyable_::noncopyable.

List of all members.

Public Member Functions

 vertex_array_object ()
 ~vertex_array_object ()
GLuint get_name () const
void bind ()
void unbind ()

Detailed Description

Vertex array object wrapper class.

The class creates a vertex array object in the constructor, and destroys it in the destructor. This makes proper use of the C++ RAII idiom, and ensures exception safety (-> no resource leak).


Constructor & Destructor Documentation

zmol::vertex_array_object::vertex_array_object ( )

Constructor. Creates the vertex array object with glGenVertexArrays().

zmol::vertex_array_object::~vertex_array_object ( )

Destructor. Destroys the vertex array object with glDeleteVertexArrays().


Member Function Documentation

void zmol::vertex_array_object::bind ( )

Binds the vertex array object to the OpenGL context.

GLuint zmol::vertex_array_object::get_name ( ) const
inline

Returns the OpenGL name of the vertex array object.

void zmol::vertex_array_object::unbind ( )

Unbinds the vertex array object from the OpenGL context.