37 void render(
const RenderContext& rc)
const override;
virtual shader_list_t requiredShaders() const override
Returns the ID of the OpenGL shader program required to render this class.
A wrapper for an OpenGL vertex array object (VAO).
void freeOpenGLResources() override
Free opengl buffers.
A wrapper for an OpenGL buffer object.
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.
Renderizable generic renderer for objects using the triangles shader.
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 renderUpdateBuffers() const override
Called whenever m_outdatedBuffers is true: used to re-generate OpenGL vertex buffers, etc.
#define DEFINE_VIRTUAL_SERIALIZABLE(class_name)
This declaration must be inserted in virtual CSerializable classes definition:
COpenGLVertexArrayObject m_vao
COpenGLBuffer m_trianglesBuffer
virtual void onUpdateBuffers_Triangles()=0
Must be implemented in derived classes to update the geometric entities to be drawn in "m_*_buffer" f...
static constexpr shader_id_t TRIANGLES
std::vector< mrpt::opengl::TTriangle > m_triangles
List of triangles.
The namespace for 3D scene representation and rendering.
CRenderizableShaderTriangles()=default
virtual ~CRenderizableShaderTriangles() override
void render(const RenderContext &rc) const override
Implements the rendering of 3D objects in each class derived from CRenderizable.