class mrpt::opengl::COpenGLVertexArrayObject

A wrapper for an OpenGL vertex array object (VAO).

Refer to docs for glGenVertexArrays().

OpenGL VAOs cannot be shared among threads/GL contexts.

#include <mrpt/opengl/COpenGLVertexArrayObject.h>

class COpenGLVertexArrayObject
{
public:
    // structs

    struct RAII_Impl;

    // construction

    COpenGLVertexArrayObject();

    //
methods

    void createOnce();
    bool isCreated() const;
    void destroy();
    void bind();
    void release();
    unsigned int bufferId() const;
};

Methods

void createOnce()

Calls create() only if the buffer has not been created yet.

void destroy()

Automatically called upon destructor, no need for the user to call it in normal situations.