diff options
author | Kim Motoyoshi Kalland <kim.kalland@nokia.com> | 2009-12-29 13:06:18 (GMT) |
---|---|---|
committer | Kim Motoyoshi Kalland <kim.kalland@nokia.com> | 2009-12-30 15:23:29 (GMT) |
commit | 592dc5978e5109c6c7c378623817938779c869a0 (patch) | |
tree | e9acdb025fc82e52d3e03738fa14b273c2d579c6 /src/opengl/qgl.h | |
parent | e5c52134bdd24a19f2aa5c29b654ab5e6b39ec89 (diff) | |
download | Qt-592dc5978e5109c6c7c378623817938779c869a0.zip Qt-592dc5978e5109c6c7c378623817938779c869a0.tar.gz Qt-592dc5978e5109c6c7c378623817938779c869a0.tar.bz2 |
Added support for OpenGL up to version 3.2 on Windows.
Task-number: QTBUG-4438, QT-2662, QT-2663
Reviewed-by: Tom
Diffstat (limited to 'src/opengl/qgl.h')
-rw-r--r-- | src/opengl/qgl.h | 23 |
1 files changed, 20 insertions, 3 deletions
diff --git a/src/opengl/qgl.h b/src/opengl/qgl.h index 2076c46..d2fe5fb 100644 --- a/src/opengl/qgl.h +++ b/src/opengl/qgl.h @@ -144,6 +144,7 @@ namespace QGL DirectRendering = 0x0080, HasOverlay = 0x0100, SampleBuffers = 0x0200, + DeprecatedFunctions = 0x0400, SingleBuffer = DoubleBuffer << 16, NoDepthBuffer = DepthBuffer << 16, ColorIndex = Rgba << 16, @@ -153,7 +154,8 @@ namespace QGL NoStereoBuffers = StereoBuffers << 16, IndirectRendering = DirectRendering << 16, NoOverlay = HasOverlay << 16, - NoSampleBuffers = SampleBuffers << 16 + NoSampleBuffers = SampleBuffers << 16, + NoDeprecatedFunctions = DeprecatedFunctions << 16 }; Q_DECLARE_FLAGS(FormatOptions, FormatOption) } @@ -235,7 +237,20 @@ public: static bool hasOpenGL(); static bool hasOpenGLOverlays(); - enum OpenGLVersionFlag { + void setVersion(int major, int minor); + int majorVersion() const; + int minorVersion() const; + + enum OpenGLContextProfile { + NoProfile, + CoreProfile, + CompatibilityProfile + }; + + void setProfile(OpenGLContextProfile profile); + OpenGLContextProfile profile() const; + + enum OpenGLVersionFlag { OpenGL_Version_None = 0x00000000, OpenGL_Version_1_1 = 0x00000001, OpenGL_Version_1_2 = 0x00000002, @@ -249,7 +264,9 @@ public: OpenGL_ES_Common_Version_1_1 = 0x00000200, OpenGL_ES_CommonLite_Version_1_1 = 0x00000400, OpenGL_ES_Version_2_0 = 0x00000800, - OpenGL_Version_3_0 = 0x00001000 + OpenGL_Version_3_0 = 0x00001000, + OpenGL_Version_3_1 = 0x00002000, + OpenGL_Version_3_2 = 0x00004000 }; Q_DECLARE_FLAGS(OpenGLVersionFlags, OpenGLVersionFlag) |