MRPT  2.0.1
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

Definition at line 42 of file COpenGLVertexArrayObject.h.

References m_impl.

Referenced by mrpt::opengl::CRenderizableShaderWireFrame::render(), mrpt::opengl::CRenderizableShaderText::render(), mrpt::opengl::CRenderizableShaderTriangles::render(), and mrpt::opengl::CRenderizableShaderPoints::render().

Here is the caller graph for this function:

◆ 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().

Here is the caller graph for this function:

◆ 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().

Here is the call graph for this function:

◆ destroy()

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

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

Definition at line 40 of file COpenGLVertexArrayObject.h.

References m_impl.

Referenced by mrpt::opengl::COpenGLVertexArrayObject::RAII_Impl::create(), mrpt::opengl::CRenderizableShaderTexturedTriangles::freeOpenGLResources(), mrpt::opengl::CRenderizableShaderTriangles::freeOpenGLResources(), mrpt::opengl::CRenderizableShaderText::freeOpenGLResources(), mrpt::opengl::CRenderizableShaderWireFrame::freeOpenGLResources(), and mrpt::opengl::CRenderizableShaderPoints::freeOpenGLResources().

Here is the caller graph for this function:

◆ isCreated()

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

Definition at line 36 of file COpenGLVertexArrayObject.h.

References m_impl.

Referenced by createOnce().

Here is the caller graph for this function:

◆ release()

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

Definition at line 43 of file COpenGLVertexArrayObject.h.

References m_impl.

Referenced by mrpt::opengl::COpenGLVertexArrayObject::RAII_Impl::destroy().

Here is the caller graph for this function:

Member Data Documentation

◆ m_impl

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



Page generated by Doxygen 1.8.14 for MRPT 2.0.1 Git: 0fef1a6d7 Fri Apr 3 23:00:21 2020 +0200 at vie abr 3 23:20:28 CEST 2020