diff options
author | Zolnai Tamás <tamas.zolnai@collabora.com> | 2014-07-21 14:08:30 +0200 |
---|---|---|
committer | Zolnai Tamás <tamas.zolnai@collabora.com> | 2014-07-21 14:08:30 +0200 |
commit | 70df3e3e507d978561565199d553314e2b24cd91 (patch) | |
tree | 986d1b8c0507cc14f2d2eab2fc166c21665b2896 /slideshow | |
parent | 378b1d24a958114eb4484cb10f609f6e482772ec (diff) |
Partly revert "Extract getGLVersion() method to OpenGLHelper" to fix mac build
This partly reverts commit 23c876deeb357b6306712ff0586a819176151c15.
Change-Id: I1008c06ec7562e090627ad3860dd198d8fa89362
Diffstat (limited to 'slideshow')
-rw-r--r-- | slideshow/source/engine/OGLTrans/mac/OGLTrans_TransitionerImpl.mm | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/slideshow/source/engine/OGLTrans/mac/OGLTrans_TransitionerImpl.mm b/slideshow/source/engine/OGLTrans/mac/OGLTrans_TransitionerImpl.mm index 62b135a446d3..47cdb2d7ee66 100644 --- a/slideshow/source/engine/OGLTrans/mac/OGLTrans_TransitionerImpl.mm +++ b/slideshow/source/engine/OGLTrans/mac/OGLTrans_TransitionerImpl.mm @@ -56,8 +56,6 @@ #include <vcl/syschild.hxx> #include <vcl/sysdata.hxx> -#include <vcl/opengl/OpenGLHelper.hxx> - #include <boost/noncopyable.hpp> #include <premac.h> @@ -313,8 +311,14 @@ bool OGLTransitionerImpl::initialize( const Reference< presentation::XSlideShowV 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" ) ); |