class mrpt::opengl::CRenderizableShaderText

Renderizable generic renderer for objects using the “text shader”.

See also:

opengl::COpenGLScene

#include <mrpt/opengl/CRenderizableShaderText.h>

class CRenderizableShaderText: public mrpt::opengl::CRenderizable
{
public:
    //
methods

    virtual shader_list_t requiredShaders() const;
    virtual void render(const RenderContext& rc) const;
    virtual void renderUpdateBuffers() const;
    virtual void onUpdateBuffers_Text() = 0;
    virtual void freeOpenGLResources();
};

// direct descendants

class CText;
class CText3D;

Inherited Members

public:
    // structs

    struct RenderContext;

    //
methods

    virtual void render(const RenderContext& rc) const = 0;
    virtual void renderUpdateBuffers() const = 0;
    virtual shader_list_t requiredShaders() const;
    virtual void getBoundingBox(mrpt::math::TPoint3D& bb_min, mrpt::math::TPoint3D& bb_max) const = 0;
    virtual void freeOpenGLResources() = 0;

Methods

virtual shader_list_t requiredShaders() const

Returns the ID of the OpenGL shader program required to render this class.

See also:

DefaultShaderID

virtual void render(const RenderContext& rc) const

Implements the rendering of 3D objects in each class derived from CRenderizable.

This can be called more than once (one per required shader program) if the object registered several shaders.

See also:

renderUpdateBuffers

virtual void renderUpdateBuffers() const

Called whenever m_outdatedBuffers is true: used to re-generate OpenGL vertex buffers, etc.

before they are sent for rendering in render()

virtual void onUpdateBuffers_Text() = 0

Must be implemented in derived classes to update the geometric entities to be drawn in “m_*_buffer” fields.

virtual void freeOpenGLResources()

Free opengl buffers.