[colobot] 293/377: Reverted changes to OpenGL version detection

Didier Raboud odyx at moszumanska.debian.org
Wed Mar 30 13:34:28 UTC 2016


This is an automated email from the git hooks/post-receive script.

odyx pushed a commit to branch debian/master
in repository colobot.

commit 739f90e38e681e5794dff0d285001386a71129af
Author: Tomasz Kapuściński <tomaszkax86 at gmail.com>
Date:   Thu Feb 18 20:51:02 2016 +0100

    Reverted changes to OpenGL version detection
---
 src/graphics/opengl/glutil.cpp | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/src/graphics/opengl/glutil.cpp b/src/graphics/opengl/glutil.cpp
index ce99c51..683c37b 100644
--- a/src/graphics/opengl/glutil.cpp
+++ b/src/graphics/opengl/glutil.cpp
@@ -95,8 +95,9 @@ int GetOpenGLVersion()
 
 int GetOpenGLVersion(int &major, int &minor)
 {
-    glGetIntegerv(GL_MAJOR_VERSION, &major);
-    glGetIntegerv(GL_MINOR_VERSION, &minor);
+    const char* version = reinterpret_cast<const char*>(glGetString(GL_VERSION));
+
+    sscanf(version, "%d.%d", &major, &minor);
 
     return 10 * major + minor;
 }

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-games/colobot.git



More information about the Pkg-games-commits mailing list