26 #if ! defined (octave_GLCanvas_h)
27 #define octave_GLCanvas_h 1
29 #if defined (HAVE_QOPENGLWIDGET)
30 # include <QOpenGLWidget>
31 # define OCTAVE_QT_OPENGL_WIDGET QOpenGLWidget
32 # include <QOpenGLFramebufferObject>
33 # define OCTAVE_QT_OPENGL_FBO QOpenGLFramebufferObject
34 # if defined (HAVE_QT_OFFSCREEN)
35 # include <QOpenGLContext>
36 # include <QOffscreenSurface>
38 #elif defined (HAVE_QGLWIDGET)
40 # define OCTAVE_QT_OPENGL_WIDGET QGLWidget
41 # include <QGLFramebufferObject>
42 # define OCTAVE_QT_OPENGL_FBO QGLFramebufferObject
44 # error "configuration error: must have <QOpenGLWidget> or <QGLWidget>."
62 GLCanvas (octave::base_qobject& oct_qobj, octave::interpreter& interp,
66 void initializeGL (
void);
70 void do_print (
const QString& file_cmd,
const QString& term,
72 void drawZoomBox (
const QPoint& p1,
const QPoint& p2);
75 graphics_object selectFromAxes (
const graphics_object& ax,
81 void mouseDoubleClickEvent (QMouseEvent *event);
82 void mouseMoveEvent (QMouseEvent *event);
83 void mousePressEvent (QMouseEvent *event);
84 void mouseReleaseEvent (QMouseEvent *event);
85 void wheelEvent (QWheelEvent *event);
86 void keyPressEvent (QKeyEvent *event);
87 void keyReleaseEvent (QKeyEvent *event);
91 bool begin_rendering (
void);
92 void end_rendering (
void);
97 # if defined (HAVE_QT_OFFSCREEN)
98 QOpenGLContext m_os_context;
99 QOffscreenSurface m_os_surface;
octave::opengl_renderer m_renderer
void resize(int, int, int, int)
octave::qopengl_functions m_glfcns
Base class for Octave interfaces that use Qt.
OCTAVE_BEGIN_NAMESPACE(octave) static octave_value daspk_fcn
void draw(QDomElement &parent_elt, pdfpainter &painter)