19 #ifndef OST_GUI_GL_CANVAS_HH
20 #define OST_GUI_GL_CANVAS_HH
27 #include <QOpenGLWindow>
28 #include <QSurfaceFormat>
32 class QOpenGLFramebufferObject;
34 class QOffscreenSurface;
36 namespace ost {
namespace gui {
49 virtual bool HasStereo()
const {
return format().stereo();};
64 unsigned int height,
bool transparent);
67 unsigned int height,
int max_samples,
bool transparent);
94 bool IsToolEvent(QInputEvent*
event)
const;
96 void HandleMousePressEvent(QMouseEvent*
event);
97 void HandleMouseReleaseEvent(QMouseEvent*
event);
98 void HandleMouseMoveEvent(QMouseEvent*
event);
105 bool offscreen_flag_;
106 QOpenGLContext* offscreen_context_;
107 QOffscreenSurface* offscreen_surface_;
108 QOpenGLFramebufferObject* offscreen_fbo_;
virtual void resizeGL(int w, int h)
virtual bool HasMultisample() const
virtual void Export(const String &fname, unsigned int width, unsigned int height, int max_samples, bool transparent)
virtual void StatusMessage(const String &m)
virtual void mouseReleaseEvent(QMouseEvent *event)
virtual void initializeGL()
virtual void Export(const String &fname, bool transparent)
virtual void keyReleaseEvent(QKeyEvent *event)
virtual void mousePressEvent(QMouseEvent *event)
virtual void mouseDoubleClickEvent(QMouseEvent *event)
virtual void mouseMoveEvent(QMouseEvent *event)
virtual void keyPressEvent(QKeyEvent *event)
void CustomContextMenuRequested(const QPoint &point)
void OnTransform(gfx::InputCommand, int indx, gfx::TransformTarget, Real val)
virtual void Export(const String &fname, unsigned int width, unsigned int height, bool transparent)
virtual bool HasStereo() const
virtual void MakeActive()
virtual void wheelEvent(QWheelEvent *event)
virtual bool event(QEvent *event)