CGVIS Utils
Loading...
Searching...
No Matches
GLArray.h File Reference

RAII wrapper for an OpenGL Vertex Array Object (VAO). More...

#include <vector>
#include <GL/glew.h>
#include <GLFW/glfw3.h>
#include "GLBuffer.h"
#include "GLProgram.h"
Include dependency graph for GLArray.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  GLArray

Detailed Description

RAII wrapper for an OpenGL Vertex Array Object (VAO).

Encapsulates creation/binding/destruction of a VAO and provides helpers to associate buffer contents with shader attributes as well as to bind an index (element) buffer. Attribute specification uses the stride/format previously established on the GLBuffer via its setData() calls.

Note
All GL calls in the implementation are wrapped via a GL() macro (see GLDebug/GLEnv). The class does not assume ownership of the buffers or program it interacts with.