summaryrefslogtreecommitdiffstats
path: root/src/platformsupport/eglconvenience/qeglplatformcontext_p.h
diff options
context:
space:
mode:
authorSamuel Rødal <samuel.rodal@digia.com>2012-10-25 16:53:18 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2013-01-18 09:16:03 +0100
commitd29aabbca9c98eb66d9cde6058ad96929c816c23 (patch)
tree4c6fc78f766d492f7f7cca9ca0bb591002c38767 /src/platformsupport/eglconvenience/qeglplatformcontext_p.h
parentac9ab9703ff299c94dca7585d5a12ecde28931bb (diff)
eglfs: Introduce way of filtering out unwanted EGL configs.
Some times a platform might want to exclude certain configs, for example based on EGL_NATIVE_VISUAL_ID. This patch introduces a new QEglConfigChooser class which has a virtual filterConfig() function which can be re-implemented in a sub-class to give finer control of how configs are chosen. Change-Id: I8b684f01be95a47307b1e429857f01337a9a38d8 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@digia.com> Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
Diffstat (limited to 'src/platformsupport/eglconvenience/qeglplatformcontext_p.h')
-rw-r--r--src/platformsupport/eglconvenience/qeglplatformcontext_p.h6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/platformsupport/eglconvenience/qeglplatformcontext_p.h b/src/platformsupport/eglconvenience/qeglplatformcontext_p.h
index 0fcf9d47c6..c7918516db 100644
--- a/src/platformsupport/eglconvenience/qeglplatformcontext_p.h
+++ b/src/platformsupport/eglconvenience/qeglplatformcontext_p.h
@@ -51,6 +51,8 @@ class QEGLPlatformContext : public QPlatformOpenGLContext
public:
QEGLPlatformContext(const QSurfaceFormat &format, QPlatformOpenGLContext *share, EGLDisplay display,
EGLenum eglApi = EGL_OPENGL_ES_API);
+ QEGLPlatformContext(const QSurfaceFormat &format, QPlatformOpenGLContext *share, EGLDisplay display,
+ EGLConfig config, EGLenum eglApi = EGL_OPENGL_ES_API);
~QEGLPlatformContext();
bool makeCurrent(QPlatformSurface *surface);
@@ -70,12 +72,14 @@ protected:
virtual EGLSurface eglSurfaceForPlatformSurface(QPlatformSurface *surface) = 0;
private:
+ void init(const QSurfaceFormat &format, QPlatformOpenGLContext *share);
+
EGLContext m_eglContext;
EGLContext m_shareContext;
EGLDisplay m_eglDisplay;
EGLenum m_eglApi;
EGLConfig m_eglConfig;
- const QSurfaceFormat m_format;
+ QSurfaceFormat m_format;
};
#endif //QEGLPLATFORMCONTEXT_H