summaryrefslogtreecommitdiff
path: root/slideshow
diff options
context:
space:
mode:
authorZolnai Tamás <tamas.zolnai@collabora.com>2014-07-21 14:14:40 +0200
committerZolnai Tamás <tamas.zolnai@collabora.com>2014-07-21 14:14:40 +0200
commitaeeddd97eb123132aa542a277e81c5f49a4d8572 (patch)
tree89128d97c59ab18138d93174b11b77ad6642bca0 /slideshow
parent70df3e3e507d978561565199d553314e2b24cd91 (diff)
Revert also an other part of "Extract getGLVersion() method to OpenGLHelper"
This partly reverts commit 23c876deeb357b6306712ff0586a819176151c15. Change-Id: I9ba7a2e8286b5fa6064c3b9e2d680fedf402f1a2
Diffstat (limited to 'slideshow')
-rw-r--r--slideshow/source/engine/OGLTrans/win/OGLTrans_TransitionerImpl.cxx12
1 files changed, 8 insertions, 4 deletions
diff --git a/slideshow/source/engine/OGLTrans/win/OGLTrans_TransitionerImpl.cxx b/slideshow/source/engine/OGLTrans/win/OGLTrans_TransitionerImpl.cxx
index 2fcd3b537976..19f22fdea618 100644
--- a/slideshow/source/engine/OGLTrans/win/OGLTrans_TransitionerImpl.cxx
+++ b/slideshow/source/engine/OGLTrans/win/OGLTrans_TransitionerImpl.cxx
@@ -56,8 +56,6 @@
#include <vcl/syschild.hxx>
#include <vcl/sysdata.hxx>
-#include <vcl/opengl/OpenGLHelper.hxx>
-
#include <boost/noncopyable.hpp>
#include <GL/gl.h>
@@ -316,8 +314,14 @@ bool OGLTransitionerImpl::initialize( const Reference< presentation::XSlideShowV
instance = new OGLTransitionerImpl( NULL );
if( instance->initWindowFromSlideShowView( xView ) ) {
- cnGLVersion = OpenGLHelper::getGLVersion();
- OSL_TRACE("GL version: %f", cnGLVersion );
+ const GLubyte* version = glGetString( GL_VERSION );
+ if( version && version[0] ) {
+ cnGLVersion = version[0] - '0';
+ if( version[1] == '.' && version[2] )
+ cnGLVersion += (version[2] - '0')/10.0;
+ } else
+ cnGLVersion = 1.0;
+ OSL_TRACE("GL version: %s parsed: %f", version, cnGLVersion );
const GLubyte* vendor = glGetString( GL_VENDOR );
cbMesa = ( vendor && strstr( (const char *) vendor, "Mesa" ) );