MRPT  2.0.3
List of all members | Classes | Public Member Functions | Private Attributes
mrpt::opengl::COpenGLVertexArrayObject Class Reference

Detailed Description

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

Refer to docs for glGenVertexArrays().

Definition at line 21 of file COpenGLVertexArrayObject.h.

#include <mrpt/opengl/COpenGLVertexArrayObject.h>

Classes

struct  RAII_Impl
 

Public Member Functions

 COpenGLVertexArrayObject ()
 
 ~COpenGLVertexArrayObject ()=default
 
void create ()
 Actually create the buffer, destroying any previously existing buffer. More...
 
void createOnce ()
 Calls create() only if the buffer has not been created yet. More...
 
bool isCreated () const
 
void destroy ()
 Automatically called upon destructor, no need for the user to call it in normal situations. More...
 
void bind ()
 
void release ()
 
unsigned int bufferId () const
 

Private Attributes

std::shared_ptr< RAII_Implm_impl
 

Constructor & Destructor Documentation

◆ COpenGLVertexArrayObject()

COpenGLVertexArrayObject::COpenGLVertexArrayObject ( )

Definition at line 19 of file COpenGLVertexArrayObject.cpp.

References m_impl.

◆ ~COpenGLVertexArrayObject()

mrpt::opengl::COpenGLVertexArrayObject::~COpenGLVertexArrayObject ( )
default

Member Function Documentation

◆ bind()

void mrpt::opengl::COpenGLVertexArrayObject::bind ( )
inline

◆ bufferId()

unsigned int mrpt::opengl::COpenGLVertexArrayObject::bufferId ( ) const
inline

Definition at line 45 of file COpenGLVertexArrayObject.h.

References m_impl.

◆ create()

void mrpt::opengl::COpenGLVertexArrayObject::create ( )
inline

Actually create the buffer, destroying any previously existing buffer.

Definition at line 29 of file COpenGLVertexArrayObject.h.

References m_impl.

Referenced by createOnce().

◆ createOnce()

void mrpt::opengl::COpenGLVertexArrayObject::createOnce ( )
inline

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

Definition at line 32 of file COpenGLVertexArrayObject.h.

References create(), and isCreated().

◆ destroy()

void mrpt::opengl::COpenGLVertexArrayObject::destroy ( )
inline

◆ isCreated()

bool mrpt::opengl::COpenGLVertexArrayObject::isCreated ( ) const
inline

Definition at line 36 of file COpenGLVertexArrayObject.h.

References m_impl.

Referenced by createOnce().

◆ release()

void mrpt::opengl::COpenGLVertexArrayObject::release ( )
inline

Member Data Documentation

◆ m_impl

std::shared_ptr<RAII_Impl> mrpt::opengl::COpenGLVertexArrayObject::m_impl
private



Page generated by Doxygen 1.8.17 for MRPT 2.0.3 at Thu May 21 21:53:32 UTC 2020