SenOGL
0.2
Library aiming to ease the use of OpenGL
|
Vertex Array Object (VAO) More...
#include <VertexArray.hpp>
Public Member Functions | |
virtual | ~VertexArray () |
Destructor. More... | |
virtual void | init () override |
Initialization of the OpenGL object. More... | |
virtual void | cleanup () override |
Destroys the OpenGLObject. More... | |
void | bind () const |
Binds the VAO. More... | |
void | attribute (GLuint index, GLint size, GLenum type, GLboolean normalized, GLsizei stride, const GLvoid *pointer) const |
glVertexAttribPointer More... | |
Public Member Functions inherited from OpenGLObject | |
OpenGLObject () | |
OpenGLObject (GLuint handle) | |
Constructs a instance managing an existing OpenGL Object. More... | |
OpenGLObject (const OpenGLObject &)=default | |
OpenGLObject (OpenGLObject &&)=default | |
OpenGLObject & | operator= (const OpenGLObject &)=default |
OpenGLObject & | operator= (OpenGLObject &&)=default |
virtual | ~OpenGLObject () |
GLuint | getName () const |
Returns OpenGL name of the object. More... | |
void | setName (GLuint n) |
Sets the OpenGL name of the object managed by this instance /!\ Use with caution ! (assignment operator is probably what you're looking for) More... | |
virtual bool | isValid () const |
Returns true if the object seems valid. More... | |
operator bool () const | |
Syntactic sugar for isValid(). More... | |
Static Public Member Functions | |
static void | unbind () |
Unbind any VAO currently bound. More... | |
Additional Inherited Members | |
Protected Attributes inherited from OpenGLObject | |
GLuint | _handle |
OpenGL name of the managed object. More... | |
Vertex Array Object (VAO)
|
virtual |
Destructor.
void VertexArray::attribute | ( | GLuint | index, |
GLint | size, | ||
GLenum | type, | ||
GLboolean | normalized, | ||
GLsizei | stride, | ||
const GLvoid * | pointer | ||
) | const |
glVertexAttribPointer
void VertexArray::bind | ( | ) | const |
Binds the VAO.
|
overridevirtual |
Destroys the OpenGLObject.
Implements OpenGLObject.
|
overridevirtual |
Initialization of the OpenGL object.
Implements OpenGLObject.
|
static |
Unbind any VAO currently bound.