summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel/qsurfaceformat.h
diff options
context:
space:
mode:
authorSamuel Rødal <samuel.rodal@nokia.com>2012-06-23 17:24:37 +0200
committerQt by Nokia <qt-info@nokia.com>2012-06-27 00:46:35 +0200
commit6874a33a75154400e8cd0424cec6d464b133c7cc (patch)
tree7bbc58b8a560522001a97180f03d191839d1d7b4 /src/gui/kernel/qsurfaceformat.h
parentcd853c0ad7a74a81aa831968c7ded60874b161ae (diff)
Fixed missing way of choosing EGL renderable type with QSurfaceFormat.
This has been long overdue, since EGL now lets you choose between desktop and ES based OpenGL. We also add OpenVG for those who want to use raw OpenVG with a QOpenGLContext. The underlying EGL API for using OpenGL / OpenVG is the same, with eglMakeCurrent() and eglSwapBuffers(). Change-Id: Ib0146b3fde5fe632069ebf99e7712f496ee7ea4d Reviewed-by: Gunnar Sletta <gunnar.sletta@nokia.com> Reviewed-by: Lars Knoll <lars.knoll@nokia.com>
Diffstat (limited to 'src/gui/kernel/qsurfaceformat.h')
-rw-r--r--src/gui/kernel/qsurfaceformat.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/gui/kernel/qsurfaceformat.h b/src/gui/kernel/qsurfaceformat.h
index a4224bbedd..e8972aa8ca 100644
--- a/src/gui/kernel/qsurfaceformat.h
+++ b/src/gui/kernel/qsurfaceformat.h
@@ -68,6 +68,13 @@ public:
TripleBuffer
};
+ enum RenderableType {
+ DefaultRenderableType = 0x0,
+ OpenGL = 0x1,
+ OpenGLES = 0x2,
+ OpenVG = 0x4
+ };
+
enum OpenGLContextProfile {
NoProfile,
CoreProfile,
@@ -106,6 +113,9 @@ public:
void setProfile(OpenGLContextProfile profile);
OpenGLContextProfile profile() const;
+ void setRenderableType(RenderableType type);
+ RenderableType renderableType() const;
+
void setMajorVersion(int majorVersion);
int majorVersion() const;