summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/wayland/qwaylandglcontext.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/plugins/platforms/wayland/qwaylandglcontext.h')
-rw-r--r--src/plugins/platforms/wayland/qwaylandglcontext.h20
1 files changed, 14 insertions, 6 deletions
diff --git a/src/plugins/platforms/wayland/qwaylandglcontext.h b/src/plugins/platforms/wayland/qwaylandglcontext.h
index 6e3c108..d9ba323 100644
--- a/src/plugins/platforms/wayland/qwaylandglcontext.h
+++ b/src/plugins/platforms/wayland/qwaylandglcontext.h
@@ -44,16 +44,19 @@
#include <QtGui/QPlatformGLContext>
+#include <QtCore/QMutex>
class QWaylandDisplay;
class QWaylandWindow;
+class QWaylandDrmWindowSurface;
-#define GL_GLEXT_PROTOTYPES
-#include <GLES2/gl2.h>
-#include <GLES2/gl2ext.h>
+#define MESA_EGL_NO_X11_HEADERS
+#define EGL_EGLEXT_PROTOTYPES
+#include <EGL/egl.h>
+#include <EGL/eglext.h>
class QWaylandGLContext : public QPlatformGLContext {
public:
- QWaylandGLContext(QWaylandDisplay *wd, QWaylandWindow *window, const QPlatformWindowFormat &format);
+ QWaylandGLContext(QWaylandDisplay *wd, const QPlatformWindowFormat &format);
~QWaylandGLContext();
void makeCurrent();
void doneCurrent();
@@ -64,8 +67,13 @@ public:
private:
QPlatformWindowFormat mFormat;
QWaylandDisplay *mDisplay;
- QWaylandWindow *mWindow;
- GLuint parentFbo, parentRbo;
+
+ static EGLint contextAttibutes[];
+ EGLContext mContext;
+
+ void createDefaultSharedContex(QWaylandDisplay *display);
+ QWaylandGLContext();
+
};