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();};
63 virtual void Export(
const String& fname,
unsigned int width,
64 unsigned int height,
bool transparent);
66 virtual void Export(
const String& fname,
unsigned int width,
67 unsigned int height,
int max_samples,
bool transparent);
69 virtual void Export(
const String& fname,
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 MakeActive()
virtual void mouseDoubleClickEvent(QMouseEvent *event)
virtual bool HasMultisample() const
virtual void keyPressEvent(QKeyEvent *event)
virtual void keyReleaseEvent(QKeyEvent *event)
virtual void mouseReleaseEvent(QMouseEvent *event)
virtual bool event(QEvent *event)
virtual void mousePressEvent(QMouseEvent *event)
virtual void mouseMoveEvent(QMouseEvent *event)
virtual void wheelEvent(QWheelEvent *event)
void CustomContextMenuRequested(const QPoint &point)
virtual void initializeGL()
virtual void resizeGL(int w, int h)
virtual bool HasStereo() const
virtual void StatusMessage(const String &m)
void OnTransform(gfx::InputCommand, int indx, gfx::TransformTarget, Real val)
virtual void Export(const String &fname, unsigned int width, unsigned int height, bool transparent)