summaryrefslogtreecommitdiffstats
path: root/src/threed/surfaces/qglcontextsurface_p.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/threed/surfaces/qglcontextsurface_p.h')
-rw-r--r--src/threed/surfaces/qglcontextsurface_p.h14
1 files changed, 8 insertions, 6 deletions
diff --git a/src/threed/surfaces/qglcontextsurface_p.h b/src/threed/surfaces/qglcontextsurface_p.h
index 6c1a8beba..4c75b3507 100644
--- a/src/threed/surfaces/qglcontextsurface_p.h
+++ b/src/threed/surfaces/qglcontextsurface_p.h
@@ -62,19 +62,21 @@ QT_BEGIN_NAMESPACE
class QGLContextSurface : public QGLAbstractSurface
{
public:
- explicit QGLContextSurface(const QGLContext *context)
- : QGLAbstractSurface(502)
- , m_context(context) {}
+ static const int QGLCONTEXT_SURFACE_ID = 502;
+
+ explicit QGLContextSurface(QOpenGLContext *context)
+ : QGLAbstractSurface(QGLCONTEXT_SURFACE_ID)
+ {
+ m_context = context;
+ }
~QGLContextSurface() {}
- QPaintDevice *device() const;
bool activate(QGLAbstractSurface *prevSurface);
void deactivate(QGLAbstractSurface *nextSurface);
QRect viewportGL() const;
+ bool isValid() const;
private:
- const QGLContext *m_context;
-
Q_DISABLE_COPY(QGLContextSurface)
};