27 #if MRPT_HAS_OPENGL_GLUT    62 #if MRPT_HAS_OPENGL_GLUT    63     glEnable(GL_LINE_SMOOTH);
    70     glEnableVertexAttribArray(attr_position);
    72     glVertexAttribPointer(
    84     glEnableVertexAttribArray(attr_color);
    86     glVertexAttribPointer(
   101     glVertexAttribPointer(
   108     CHECK_OPENGL_ERROR();
   112     glVertexAttribPointer(
   119     CHECK_OPENGL_ERROR();
   124     glDrawArrays(GL_TRIANGLES, 0, 3 * 
m_triangles.size());
   125     CHECK_OPENGL_ERROR();
   127     glDisableVertexAttribArray(attr_position);
   128     glDisableVertexAttribArray(attr_color);
   129     CHECK_OPENGL_ERROR();
 void createOnce()
Calls create() only if the buffer has not been created yet. 
 
#define IMPLEMENTS_VIRTUAL_SERIALIZABLE(class_name, base_class, NS)
This must be inserted as implementation of some required members for virtual CSerializable classes: ...
 
const mrpt::opengl::Program * shader
 
void allocate(const void *data, int byteCount)
Reserves byteCount bytes in the buffer and copy to it the provided data. 
 
virtual void onUpdateBuffers_Text()=0
Must be implemented in derived classes to update the geometric entities to be drawn in "m_*_buffer" f...
 
The base class of 3D objects that can be directly rendered through OpenGL. 
 
COpenGLVertexArrayObject m_vao
 
int attributeId(const char *name) const
 
Context for calls to render() 
 
COpenGLBuffer m_linesVertexBuffer
 
void render(const RenderContext &rc) const override
Implements the rendering of 3D objects in each class derived from CRenderizable. 
 
void renderUpdateBuffers() const override
Called whenever m_outdatedBuffers is true: used to re-generate OpenGL vertex buffers, etc. 
 
COpenGLBuffer m_trianglesBuffer
 
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries. 
 
std::vector< mrpt::math::TPoint3Df > m_vertex_buffer_data
List of lines. 
 
Renderizable generic renderer for objects using the "text shader". 
 
virtual ~CRenderizableShaderText() override
 
The namespace for 3D scene representation and rendering. 
 
void createOnce()
Calls create() only if the buffer has not been created yet. 
 
std::vector< mrpt::opengl::TTriangle > m_triangles
List of triangles. 
 
COpenGLBuffer m_linesColorBuffer
 
#define BUFFER_OFFSET(offset)
 
std::vector< mrpt::img::TColor > m_color_buffer_data