SenOGL  0.2
Library aiming to ease the use of OpenGL
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | Static Public Member Functions | List of all members
VertexArray Class Reference

Vertex Array Object (VAO) More...

#include <VertexArray.hpp>

Inheritance diagram for VertexArray:
OpenGLObject

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
 
OpenGLObjectoperator= (const OpenGLObject &)=default
 
OpenGLObjectoperator= (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...
 

Detailed Description

Vertex Array Object (VAO)

Constructor & Destructor Documentation

VertexArray::~VertexArray ( )
virtual

Destructor.

Member Function Documentation

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.

void VertexArray::cleanup ( )
overridevirtual

Destroys the OpenGLObject.

Implements OpenGLObject.

void VertexArray::init ( )
overridevirtual

Initialization of the OpenGL object.

Implements OpenGLObject.

void VertexArray::unbind ( )
static

Unbind any VAO currently bound.


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