zMol
A viewer for molecular data using OpenGL and ambient occlusion
|
#include <vertex_array_object.hpp>
Inherits zmol::noncopyable_::noncopyable.
Public Member Functions | |
vertex_array_object () | |
~vertex_array_object () | |
GLuint | get_name () const |
void | bind () |
void | unbind () |
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).
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().
void zmol::vertex_array_object::bind | ( | ) |
Binds the vertex array object to the OpenGL context.
|
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.