37 void render(
const RenderContext& rc)
const override;
A wrapper for an OpenGL vertex array object (VAO).
COpenGLBuffer m_trianglesColorBuffer
A wrapper for an OpenGL buffer object.
virtual void onUpdateBuffers_Text()=0
Must be implemented in derived classes to update the geometric entities to be drawn in "m_*_buffer" f...
void destroy()
Automatically called upon destructor, no need for the user to call it in normal situations.
The base class of 3D objects that can be directly rendered through OpenGL.
COpenGLVertexArrayObject m_vao
static constexpr shader_id_t TEXT
void destroy()
Automatically called upon destructor, no need for the user to call it in normal situations.
std::vector< shader_id_t > shader_list_t
A list of shader IDs.
void freeOpenGLResources() override
Free opengl buffers.
#define DEFINE_VIRTUAL_SERIALIZABLE(class_name)
This declaration must be inserted in virtual CSerializable classes definition:
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.
CRenderizableShaderText()=default
virtual shader_list_t requiredShaders() const override
Returns the ID of the OpenGL shader program required to render this class.
COpenGLBuffer m_trianglesBuffer
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.
std::vector< mrpt::opengl::TTriangle > m_triangles
List of triangles.
COpenGLBuffer m_linesColorBuffer
std::vector< mrpt::img::TColor > m_color_buffer_data