From 302f567e838b24f54a5da42f8b363ee523ac35e7 Mon Sep 17 00:00:00 2001 From: David Tardon Date: Tue, 11 Sep 2012 09:15:20 +0200 Subject: make conditionally-compiled code easier to read Change-Id: I6e855fd09ded2afc14379b75a7ab66b99588dd6b --- .../engine/OGLTrans/unx/OGLTrans_TransitionerImpl.cxx | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) (limited to 'slideshow') 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& 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& 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() -- cgit