33 #if MRPT_HAS_OPENGL_GLUT 35 glGenBuffers(1, &buffer);
36 this->buffer_id = buffer;
37 this->created_from = std::this_thread::get_id();
45 #if MRPT_HAS_OPENGL_GLUT 46 if (created_from == std::this_thread::get_id())
49 glDeleteBuffers(1, &buffer_id);
58 #if MRPT_HAS_OPENGL_GLUT 60 glBindBuffer(static_cast<GLenum>(
type), buffer_id);
66 #if MRPT_HAS_OPENGL_GLUT 68 if (created_from != std::this_thread::get_id())
return;
70 glBindBuffer(static_cast<GLenum>(
type), 0);
76 #if MRPT_HAS_OPENGL_GLUT 79 static_cast<GLenum>(
type), byteCount,
data, static_cast<GLenum>(
usage));
void destroy()
Automatically called upon destructor, no need for the user to call it in normal situations.
RAII_Impl(COpenGLBuffer::Type t)
#define ASSERT_(f)
Defines an assertion mechanism.
std::shared_ptr< RAII_Impl > m_impl
void allocate(const void *data, int byteCount)
The namespace for 3D scene representation and rendering.
static struct FontData data