summaryrefslogtreecommitdiff
path: root/slideshow
diff options
context:
space:
mode:
authorDavid Tardon <dtardon@redhat.com>2012-09-11 09:15:20 +0200
committerDavid Tardon <dtardon@redhat.com>2012-11-22 10:47:14 +0100
commit302f567e838b24f54a5da42f8b363ee523ac35e7 (patch)
tree12695612b0c065a898502cf641fc582f77c3df11 /slideshow
parent89488e43b27a97ffdc7213e38d0ea1584a81c571 (diff)
make conditionally-compiled code easier to read
Change-Id: I6e855fd09ded2afc14379b75a7ab66b99588dd6b
Diffstat (limited to 'slideshow')
-rw-r--r--slideshow/source/engine/OGLTrans/unx/OGLTrans_TransitionerImpl.cxx18
1 files changed, 14 insertions, 4 deletions
diff --git a/slideshow/source/engine/OGLTrans/unx/OGLTrans_TransitionerImpl.cxx b/slideshow/source/engine/OGLTrans/unx/OGLTrans_TransitionerImpl.cxx
index fec30579bb16..f7310fff7588 100644
--- a/slideshow/source/engine/OGLTrans/unx/OGLTrans_TransitionerImpl.cxx
+++ b/slideshow/source/engine/OGLTrans/unx/OGLTrans_TransitionerImpl.cxx
@@ -212,6 +212,8 @@ protected:
private:
static void impl_initializeOnce( bool const bGLXPresent );
+ void impl_createTexture( bool useMipmap, uno::Sequence<sal_Int8>& data, const OGLFormat* pFormat );
+
bool initWindowFromSlideShowView( const uno::Reference< presentation::XSlideShowView >& xView );
/** After the window has been created, and the slides have been set, we'll initialize the slides with OpenGL.
*/
@@ -905,7 +907,19 @@ void OGLTransitionerImpl::createTexture( unsigned int* texID,
glTexParameteri(GL_TEXTURE_2D,GL_TEXTURE_MIN_FILTER,GL_NEAREST);
}
} else {
+ impl_createTexture( useMipmap, data, pFormat );
+ }
+#else
+ impl_createTexture( useMipmap, data, pFormat );
#endif
+ SAL_WARN_IF(!glIsTexture(*texID), "slideshow.opengl", "Can't generate Leaving slide textures in OpenGL");
+}
+
+void OGLTransitionerImpl::impl_createTexture(
+ bool useMipmap,
+ uno::Sequence<sal_Int8>& data,
+ const OGLFormat* pFormat )
+{
if( !pFormat )
{
// force-convert color to ARGB8888 int color space
@@ -943,10 +957,6 @@ void OGLTransitionerImpl::createTexture( unsigned int* texID,
glTexParameterf( GL_TEXTURE_2D, GL_TEXTURE_MAX_ANISOTROPY_EXT, largest_supported_anisotropy );
}
}
-#if defined( GLX_VERSION_1_3 ) && defined( GLX_EXT_texture_from_pixmap )
- }
-#endif
- SAL_WARN_IF(!glIsTexture(*texID), "slideshow.opengl", "Can't generate Leaving slide textures in OpenGL");
}
void OGLTransitionerImpl::prepareEnvironment()