13 #include <mrpt/config.h> 17 #if QT_VERSION < QT_VERSION_CHECK(5, 4, 0) 19 #define QOpenGLWidget QGLWidget 21 #include <QOpenGLWidget> 31 CQtGlCanvasBase(QWidget* parent =
nullptr);
32 virtual ~CQtGlCanvasBase() =
default;
34 virtual void initializeGL()
override;
35 virtual void paintGL()
override;
36 virtual void resizeGL(
int width,
int height)
override;
42 float getCameraZoomDistance()
const;
45 virtual void mousePressEvent(QMouseEvent* event)
override;
46 virtual void mouseMoveEvent(QMouseEvent* event)
override;
47 virtual void mouseReleaseEvent(QMouseEvent* event)
override;
48 virtual void wheelEvent(QWheelEvent* event)
override;
50 virtual void swapBuffers()
override {}
51 virtual void preRender()
override {}
52 virtual void postRender()
override {}
53 virtual void renderError(
const std::string& err_msg)
override;
55 virtual void updateCamerasParams();
59 bool isPressLMouseButton()
const;
60 bool isPressRMouseButton()
const;
64 void unpressMouseButtons();
67 bool m_isPressLMouseButton;
68 bool m_isPressRMouseButton;
77 #endif // MRPT_HAS_Qt5 std::shared_ptr< COpenGLViewport > Ptr
std::shared_ptr< CRenderizable > Ptr
GLsizei const GLchar ** string
This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
This base class implements a working with opengl::Camera and a OpenGL canvas, and it's used in gui::C...
GLenum GLsizei GLsizei height