class mrpt::gui::MRPT2NanoguiGLCanvas

An extension of nanogui::GLCanvas to render MRPT OpenGL scenes.

Directly access scene (locking its mutex scene_mtx first) to update the scene to be rendered.

See also:

CDisplayWindowGUI

#include <mrpt/gui/MRPT2NanoguiGLCanvas.h>

class MRPT2NanoguiGLCanvas: public GLCanvas
{
public:
    //
fields

    mrpt::opengl::COpenGLScene::Ptr scene;
    std::mutex scene_mtx;

    // construction

    MRPT2NanoguiGLCanvas(nanogui::Widget* parent);

    //
methods

    virtual void drawGL();
    CGlCanvasBase& camera();
    const CGlCanvasBase& camera() const;
};

Fields

mrpt::opengl::COpenGLScene::Ptr scene

The scene to render in this control.

Users must lock the mutex scene_mtx while modifying this variable.