summaryrefslogtreecommitdiffstats
path: root/src/opengl/qgl.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/opengl/qgl.h')
-rw-r--r--src/opengl/qgl.h27
1 files changed, 12 insertions, 15 deletions
diff --git a/src/opengl/qgl.h b/src/opengl/qgl.h
index 4d7b6f1978..e08e2d234f 100644
--- a/src/opengl/qgl.h
+++ b/src/opengl/qgl.h
@@ -42,23 +42,23 @@
#ifndef QGL_H
#define QGL_H
-#include <QtGui/qwidget.h>
+#include <QtWidgets/qwidget.h>
#include <QtGui/qpaintengine.h>
#include <QtOpenGL/qglcolormap.h>
#include <QtCore/qmap.h>
#include <QtCore/qscopedpointer.h>
-#ifdef Q_WS_QPA
-#include <QtGui/QPlatformWindowFormat>
-#endif
+#include <QtGui/QSurfaceFormat>
QT_BEGIN_HEADER
-#if defined(Q_WS_WIN)
+#if defined(Q_OS_WIN)
# include <QtCore/qt_windows.h>
#endif
-#if defined(QT_OPENGL_ES_1)
+#if defined(Q_OS_MAC)
+# include <OpenGL/gl.h>
+#elif defined(QT_OPENGL_ES_1)
# if defined(Q_OS_MAC)
# include <OpenGLES/ES1/gl.h>
# else
@@ -284,10 +284,8 @@ public:
static OpenGLVersionFlags openGLVersionFlags();
-#if defined(Q_WS_QPA)
- static QGLFormat fromPlatformWindowFormat(const QPlatformWindowFormat &format);
- static QPlatformWindowFormat toPlatformWindowFormat(const QGLFormat &format);
-#endif
+ static QGLFormat fromSurfaceFormat(const QSurfaceFormat &format);
+ static QSurfaceFormat toSurfaceFormat(const QGLFormat &format);
private:
QGLFormatPrivate *d;
@@ -399,8 +397,10 @@ public:
static const QGLContext* currentContext();
#ifdef Q_WS_QPA
- static QGLContext *fromPlatformGLContext(QPlatformGLContext *platformContext);
+ static QGLContext *fromGuiGLContext(QGuiGLContext *platformContext);
+ QGuiGLContext *contextHandle() const;
#endif
+
protected:
virtual bool chooseContext(const QGLContext* shareContext = 0);
@@ -431,7 +431,7 @@ protected:
private:
#ifdef Q_WS_QPA
- QGLContext(QPlatformGLContext *platformContext);
+ QGLContext(QGuiGLContext *windowContext);
#endif
QScopedPointer<QGLContextPrivate> d_ptr;
@@ -446,8 +446,6 @@ private:
friend class QGL2PaintEngineEx;
friend class QGL2PaintEngineExPrivate;
friend class QGLEngineShaderManager;
- friend class QGLWindowSurface;
- friend class QGLPixmapData;
friend class QGLPixmapFilterBase;
friend class QGLTextureGlyphCache;
friend struct QGLGlyphTexture;
@@ -469,7 +467,6 @@ private:
friend class QGLFBOGLPaintDevice;
friend class QGLPaintDevice;
friend class QGLWidgetGLPaintDevice;
- friend class QX11GLPixmapData;
friend class QX11GLSharedContexts;
friend class QGLContextResourceBase;
friend class QSGDistanceFieldGlyphCache;