[Libreoffice-commits] core.git: Branch 'feature/mac-opengl-fixes' - 665 commits - accessibility/source android/experimental avmedia/source basctl/AllLangResTarget_basctl.mk basctl/source basctl/uiconfig basctl/UIConfig_basicide.mk basic/source bean/com bean/qa bin/count-todo-dialogs bin/get-bugzilla-attachments-by-mimetype bridges/source bridges/test canvas/opengl canvas/source chart2/opengl chart2/qa chart2/source cli_ure/source codemaker/test comphelper/qa comphelper/source config_host.mk.in configmgr/qa configure.ac connectivity/com connectivity/qa connectivity/source cppcanvas/source cppuhelper/source cppu/source crashrep/source cui/AllLangResTarget_cui.mk cui/source cui/uiconfig dbaccess/qa dbaccess/source dbaccess/uiconfig dbaccess/UIConfig_dbaccess.mk desktop/source desktop/test desktop/uiconfig desktop/UIConfig_deployment.mk dictionaries download.lst drawinglayer/source dtrans/source editeng/inc editeng/source embeddedobj/source embeddedobj/test extensions/AllLangResTarget_scn.mk extensio ns/inc extensions/Module_extensions.mk extensions/qa extensions/source extensions/uiconfig extensions/UIConfig_sbibliography.mk external/apache-commons external/boost external/collada2gltf external/glew external/icu external/jfreereport external/lcms2 external/libgltf external/libpagemaker external/libxslt extras/CustomTarget_autocorr.mk extras/Package_autocorr.mk extras/source filter/qa filter/source forms/qa forms/source formula/source fpicker/source framework/inc framework/qa framework/source .gitignore helpcontent2 i18npool/source icon-themes/galaxy icon-themes/hicontrast icon-themes/sifr include/basebmp include/basic include/canvas include/comphelper include/connectivity include/editeng include/filter include/oox include/osl include/postmac.h include/postx.h include/premac.h include/prex.h include/sal include/sfx2 include/svl include/svtools include/svx include/tools include/unotools include/vcl instsetoo_native/util io/source javaunohelper/com javaunohelper/test jurt/com jurt/ test jvmfwk/plugins jvmfwk/source leak-suppress.txt linguistic/source lotuswordpro/source m4/ax_boost_base.m4 nlpsolver/src nlpsolver/ThirdParty odk/examples odk/source offapi/com officecfg/registry oox/inc oox/source package/qa postprocess/CustomTarget_images.mk postprocess/Package_images.mk qadevOOo/runner qadevOOo/testdocs qadevOOo/tests readlicense_oo/license registry/source reportbuilder/java reportdesign/source reportdesign/uiconfig RepositoryExternal.mk RepositoryModule_host.mk ridljar/com ridljar/test rsc/inc rsc/source salhelper/source sal/osl sc/inc scp2/inc scp2/source sc/qa scripting/examples scripting/java scripting/source scripting/workben sc/sdi sc/source sc/uiconfig sdext/source sd/inc sd/qa sd/sdi sd/source sd/uiconfig sfx2/inc sfx2/Library_sfx.mk sfx2/qa sfx2/sdi sfx2/source sfx2/uiconfig shell/source slideshow/Library_OGLTrans.mk slideshow/source smoketest/com smoketest/org solenv/bin solenv/gcc-wrappers solenv/gdb sot/qa sot/source starmath/inc starmath/source sv l/source svtools/inc svtools/Library_svt.mk svtools/source svtools/uiconfig svtools/UIConfig_svt.mk svx/inc svx/Library_svxcore.mk svx/sdi svx/source svx/uiconfig svx/UIConfig_svx.mk svx/workben sw/AllLangResTarget_sw.mk sw/CppunitTest_sw_htmlexport.mk sw/CppunitTest_sw_ooxmlexport2.mk sw/CppunitTest_sw_ooxmlexport3.mk sw/CppunitTest_sw_ooxmlexport4.mk sw/CppunitTest_sw_ooxmlexport5.mk sw/CppunitTest_sw_ooxmlexport.mk sw/CppunitTest_sw_tox.mk sw/CppunitTest_sw_uwriter.mk swext/Extension_wiki-publisher.mk swext/mediawiki sw/inc sw/Module_sw.mk sw/ooxmlexport_setup.mk sw/qa sw/README sw/sdi sw/source sw/uiconfig sw/UIConfig_swriter.mk test/source testtools/com testtools/source toolkit/qa toolkit/source toolkit/test tools/source ucb/qa ucb/source unotest/source unotools/source unusedcode.easy uui/AllLangResTarget_uui.mk uui/source uui/uiconfig uui/UIConfig_uui.mk vcl/android vcl/headless vcl/inc vcl/ios vcl/Library_vclopengl.mk vcl/osx vcl/qa vcl/source vcl/unx vcl/win wizards/com wiza rds/source writerfilter/CustomTarget_source.mk writerfilter/documentation writerfilter/inc writerfilter/qa writerfilter/source writerperfect/source xmerge/source xmloff/source xmlscript/source xmlsecurity/inc xmlsecurity/source xmlsecurity/test_docs

Markus Mohrhard markus.mohrhard at googlemail.com
Sun Aug 31 16:31:30 PDT 2014


Rebased ref, commits from common ancestor:
commit 79d8db39b75bd3e4cd42e667a453f5307e23d50e
Author: Markus Mohrhard <markus.mohrhard at googlemail.com>
Date:   Mon Sep 1 01:18:09 2014 +0200

    use SystemWindowData to request a NSOpenGLWindow
    
    Change-Id: Ief50a2fc533846cd61be66b1ea166a992942083b

diff --git a/include/vcl/sysdata.hxx b/include/vcl/sysdata.hxx
index 59aaaa0..8ac816a 100644
--- a/include/vcl/sysdata.hxx
+++ b/include/vcl/sysdata.hxx
@@ -51,6 +51,7 @@ struct SystemEnvData
     HWND                hWnd;           // the window hwnd
 #elif defined( MACOSX )
     NSView*             mpNSView;       // the cocoa (NSView *) implementing this object
+    bool                mbOpenGL;       // use a OpenGL providing NSView
 #elif defined( ANDROID )
     // Nothing
 #elif defined( IOS )
@@ -75,6 +76,7 @@ struct SystemEnvData
         , hWnd(0)
 #elif defined( MACOSX )
         , mpNSView(NULL)
+        , mbOpenGL(false)
 #elif defined( ANDROID )
 #elif defined( IOS )
 #elif defined( UNX )
@@ -174,7 +176,8 @@ struct SystemWindowData
 {
     unsigned long   nSize;          // size in bytes of this structure
 #if defined( WNT )                  // meaningless on Windows
-#elif defined( MACOSX )             // meaningless on Mac OS X
+#elif defined( MACOSX )
+    bool            bOpenGL;        // create a OpenGL providing NSView
     // Nothing
 #elif defined( ANDROID )
     // Nothing
diff --git a/vcl/inc/osx/salobj.h b/vcl/inc/osx/salobj.h
index 8e18a7d..5db9d3e 100644
--- a/vcl/inc/osx/salobj.h
+++ b/vcl/inc/osx/salobj.h
@@ -52,7 +52,7 @@ public:
 
     void setClippedPosSize();
 
-    AquaSalObject( AquaSalFrame* pFrame );
+    AquaSalObject( AquaSalFrame* pFrame, SystemWindowData* pWinData );
     virtual ~AquaSalObject();
 
     virtual void                    ResetClipRegion() SAL_OVERRIDE;
diff --git a/vcl/osx/salinst.cxx b/vcl/osx/salinst.cxx
index 532fc38..93d1e1a 100644
--- a/vcl/osx/salinst.cxx
+++ b/vcl/osx/salinst.cxx
@@ -757,13 +757,12 @@ void AquaSalInstance::DestroyFrame( SalFrame* pFrame )
     delete pFrame;
 }
 
-SalObject* AquaSalInstance::CreateObject( SalFrame* pParent, SystemWindowData* /* pWindowData */, bool /* bShow */ )
+SalObject* AquaSalInstance::CreateObject( SalFrame* pParent, SystemWindowData* pWindowData, bool /* bShow */ )
 {
-    // SystemWindowData is meaningless on Mac OS X
     AquaSalObject *pObject = NULL;
 
     if ( pParent )
-        pObject = new AquaSalObject( static_cast<AquaSalFrame*>(pParent) );
+        pObject = new AquaSalObject( static_cast<AquaSalFrame*>(pParent), pWindowData );
 
     return pObject;
 }
diff --git a/vcl/osx/salobj.cxx b/vcl/osx/salobj.cxx
index 7f9df92..7c7ad5d 100644
--- a/vcl/osx/salobj.cxx
+++ b/vcl/osx/salobj.cxx
@@ -22,8 +22,9 @@
 #include "osx/saldata.hxx"
 #include "osx/salobj.h"
 #include "osx/salframe.h"
+#include <AppKit/NSOpenGLView.h>
 
-AquaSalObject::AquaSalObject( AquaSalFrame* pFrame ) :
+AquaSalObject::AquaSalObject( AquaSalFrame* pFrame, SystemWindowData* pWindowData ) :
     mpFrame( pFrame ),
     mnClipX( -1 ),
     mnClipY( -1 ),
@@ -37,6 +38,7 @@ AquaSalObject::AquaSalObject( AquaSalFrame* pFrame ) :
 {
     maSysData.nSize = sizeof( maSysData );
     maSysData.mpNSView = NULL;
+    maSysData.mbOpenGL = pWindowData->bOpenGL;
 
     NSRect aInitFrame = { NSZeroPoint, { 20, 20 } };
     mpClipView = [[NSClipView alloc] initWithFrame: aInitFrame ];
@@ -45,8 +47,25 @@ AquaSalObject::AquaSalObject( AquaSalFrame* pFrame ) :
         [mpFrame->getNSView() addSubview: mpClipView];
         [mpClipView setHidden: YES];
     }
-    maSysData.mpNSView = [[NSView alloc] initWithFrame: aInitFrame];
-    if( maSysData.mpNSView )
+    if (pWindowData->bOpenGL)
+    {
+        NSOpenGLPixelFormatAttribute aAttributes[] =
+        {
+            NSOpenGLPFADoubleBuffer,
+            NSOpenGLPFAAlphaSize, 8,
+            NSOpenGLPFAColorSize, 24,
+            0
+        };
+
+        NSOpenGLPixelFormat* pixFormat = [[NSOpenGLPixelFormat alloc] initWithAttributes:aAttributes];
+        maSysData.mpNSView = [[NSOpenGLView alloc] initWithFrame: aInitFrame pixelFormat:pixFormat];
+
+    }
+    else
+    {
+        maSysData.mpNSView = [[NSView alloc] initWithFrame: aInitFrame];
+    }
+        if( maSysData.mpNSView )
     {
         if( mpClipView )
             [mpClipView setDocumentView: maSysData.mpNSView];
diff --git a/vcl/source/opengl/OpenGLContext.cxx b/vcl/source/opengl/OpenGLContext.cxx
index 5ca5701..3161cf8 100644
--- a/vcl/source/opengl/OpenGLContext.cxx
+++ b/vcl/source/opengl/OpenGLContext.cxx
@@ -719,6 +719,9 @@ bool OpenGLContext::initWindow()
 SystemWindowData OpenGLContext::generateWinData(Window* /*pParent*/)
 {
     SystemWindowData aWinData;
+#if defined(MACOSX)
+    aWinData.bOpenGL = true;
+#endif
     aWinData.nSize = sizeof(aWinData);
     return aWinData;
 }
commit 19ef6a605b1bdc4987f1246b419aee6c386d1e53
Author: Markus Mohrhard <markus.mohrhard at googlemail.com>
Date:   Mon Sep 1 00:39:19 2014 +0200

    replace check with GLEW variable
    
    Change-Id: I818d099c70f2f886908584e67a73934dee5dbef8

diff --git a/slideshow/source/engine/OGLTrans/generic/OGLTrans_TransitionerImpl.cxx b/slideshow/source/engine/OGLTrans/generic/OGLTrans_TransitionerImpl.cxx
index 24c85f2..bb0e979 100644
--- a/slideshow/source/engine/OGLTrans/generic/OGLTrans_TransitionerImpl.cxx
+++ b/slideshow/source/engine/OGLTrans/generic/OGLTrans_TransitionerImpl.cxx
@@ -376,9 +376,7 @@ bool OGLTransitionerImpl::initWindowFromSlideShowView( const Reference< presenta
     mpContext->setWinPosAndSize(Point(aCanvasArea.X, aCanvasArea.Y), Size(aCanvasArea.Width, aCanvasArea.Height));
     SAL_INFO("slideshow.opengl", "canvas area: " << aCanvasArea.X << "," << aCanvasArea.Y << " - " << aCanvasArea.Width << "x" << aCanvasArea.Height);
 
-    GLWindow& rGLWindow(mpContext->getOpenGLWindow());
-
-    mbGenerateMipmap = rGLWindow.HasGLExtension( "GL_SGIS_generate_mipmap" );
+    mbGenerateMipmap = GLEW_SGIS_generate_mipmap;
 
     CHECK_GL_ERROR();
     glEnable(GL_CULL_FACE);
commit c56e68067e1c8d1221061ecf5fb487e9fbe9fde4
Author: Markus Mohrhard <markus.mohrhard at googlemail.com>
Date:   Mon Sep 1 00:36:15 2014 +0200

    switch to a NSOpenGLView implementation
    
    Change-Id: Ifed59a9e899abc900ddf27378eec6b641be061d3

diff --git a/vcl/Library_vclopengl.mk b/vcl/Library_vclopengl.mk
index 11b46e5..e5fbbfe 100644
--- a/vcl/Library_vclopengl.mk
+++ b/vcl/Library_vclopengl.mk
@@ -10,6 +10,7 @@
 $(eval $(call gb_Library_Library,vclopengl))
 
 $(eval $(call gb_Library_set_include,vclopengl,\
+    -I$(SRCDIR)/vcl/inc/ \
     $$(INCLUDE) \
 ))
 
@@ -37,12 +38,28 @@ $(eval $(call gb_Library_use_libraries,vclopengl,\
     $(gb_UWINAPI) \
 ))
 
+ifeq ($(OS),MACOSX)
+
+$(eval $(call gb_Library_add_cxxflags,vclopengl,\
+    $(gb_OBJCXXFLAGS) \
+))
+
+$(eval $(call gb_Library_add_libs,vcl,\
+    -framework IOKit \
+    -F/System/Library/PrivateFrameworks \
+    -framework CoreUI \
+    -lobjc \
+))
+
 $(eval $(call gb_Library_add_exception_objects,vclopengl,\
+    vcl/osx/OpenGLWrapper \
     vcl/source/opengl/OpenGLContext \
     vcl/source/opengl/OpenGLHelper \
     vcl/source/window/openglwin \
 ))
 
+endif
+
 ifeq ($(strip $(OS)),WNT)
 $(eval $(call gb_Library_use_system_win32_libs,vclopengl,\
     opengl32 \
@@ -52,6 +69,9 @@ $(eval $(call gb_Library_use_system_win32_libs,vclopengl,\
 else ifeq ($(OS),MACOSX)
 $(eval $(call gb_Library_use_system_darwin_frameworks,vclopengl,\
 	OpenGL \
+    Cocoa \
+    Carbon \
+    CoreFoundation \
 ))
 else ifeq ($(OS),LINUX)
 $(eval $(call gb_Library_add_libs,vclopengl,\
diff --git a/vcl/inc/OpenGLWrapper.hxx b/vcl/inc/OpenGLWrapper.hxx
new file mode 100644
index 0000000..6911c33
--- /dev/null
+++ b/vcl/inc/OpenGLWrapper.hxx
@@ -0,0 +1,30 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#include "AppKit/NSOpenGLView.h"
+#include "AppKit/NSOpenGL.h"
+
+class OpenGLWrapper
+{
+private:
+
+    OpenGLWrapper();
+    OpenGLWrapper(const OpenGLWrapper&);
+    OpenGLWrapper& operator=(const OpenGLWrapper&);
+
+public:
+
+    static void swapBuffers(NSOpenGLView* pView);
+    static void makeCurrent(NSOpenGLView* pView);
+    static void resetCurrent();
+
+    static void init(NSOpenGLView* pView);
+};
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/osx/OpenGLWrapper.cxx b/vcl/osx/OpenGLWrapper.cxx
new file mode 100644
index 0000000..dc9ad7a
--- /dev/null
+++ b/vcl/osx/OpenGLWrapper.cxx
@@ -0,0 +1,31 @@
+/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
+/*
+ * This file is part of the LibreOffice project.
+ *
+ * This Source Code Form is subject to the terms of the Mozilla Public
+ * License, v. 2.0. If a copy of the MPL was not distributed with this
+ * file, You can obtain one at http://mozilla.org/MPL/2.0/.
+ */
+
+#include "OpenGLWrapper.hxx"
+
+void OpenGLWrapper::swapBuffers(NSOpenGLView* pView)
+{
+    [[pView openGLContext] flushBuffer];
+}
+
+void OpenGLWrapper::makeCurrent(NSOpenGLView* pView)
+{
+    [[pView openGLContext] makeCurrentContext];
+}
+
+void OpenGLWrapper::resetCurrent()
+{
+    [NSOpenGLContext clearCurrentContext];
+}
+
+void OpenGLWrapper::init(NSOpenGLView* pView)
+{
+}
+
+/* vim:set shiftwidth=4 softtabstop=4 expandtab: */
diff --git a/vcl/source/opengl/OpenGLContext.cxx b/vcl/source/opengl/OpenGLContext.cxx
index 3d89c70..5ca5701 100644
--- a/vcl/source/opengl/OpenGLContext.cxx
+++ b/vcl/source/opengl/OpenGLContext.cxx
@@ -17,6 +17,10 @@
 #include <vcl/bmpacc.hxx>
 #include <vcl/graph.hxx>
 
+#include <premac.h>
+#include "OpenGLWrapper.hxx"
+#include <postmac.h>
+
 using namespace com::sun::star;
 
 GLWindow::~GLWindow()
@@ -44,8 +48,7 @@ OpenGLContext::~OpenGLContext()
         ReleaseDC( m_aGLWin.hWnd, m_aGLWin.hDC );
     }
 #elif defined( MACOSX )
-    CGLSetCurrentContext(NULL);
-    CGLDestroyContext(m_aGLWin.context);
+    OpenGLWrapper::resetCurrent();
 #elif defined( IOS ) || defined( ANDROID )
     // nothing
 #elif defined( UNX )
@@ -480,29 +483,6 @@ bool OpenGLContext::ImplInit()
 
 #elif defined( MACOSX )
 
-    CGLPixelFormatAttribute pixelFormatAttributes[] = {
-#if MACOSX_SDK_VERSION > 1060
-        kCGLPFAOpenGLProfile, (CGLPixelFormatAttribute) kCGLOGLPVersion_3_2_Core,
-#endif
-        kCGLPFAColorSize, (CGLPixelFormatAttribute) 24,
-        kCGLPFAAlphaSize, (CGLPixelFormatAttribute) 8,
-        kCGLPFADoubleBuffer,
-        kCGLPFASampleBuffers, (CGLPixelFormatAttribute) 1,
-        kCGLPFASampleBuffers, (CGLPixelFormatAttribute) 4,
-        (CGLPixelFormatAttribute) 0
-        };
-
-    if (mbRequestLegacyContext)
-        pixelFormatAttributes[1] = (CGLPixelFormatAttribute) kCGLOGLPVersion_Legacy;
-
-    CGLPixelFormatObj pixelFormat;
-    GLint numberOfPixels;
-    CGLChoosePixelFormat(pixelFormatAttributes, &pixelFormat, &numberOfPixels);
-
-    CGLCreateContext(pixelFormat, 0, &m_aGLWin.context);
-    CGLDestroyPixelFormat(pixelFormat);
-
-    CGLSetCurrentContext(m_aGLWin.context);
 
 #elif defined( IOS )
 
@@ -849,8 +829,6 @@ void OpenGLContext::makeCurrent()
         SAL_WARN("vcl.opengl", "OpenGLContext::makeCurrent(): wglMakeCurrent failed: " << GetLastError());
     }
 #elif defined( MACOSX )
-    CGLError nError = CGLSetCurrentContext(m_aGLWin.context);
-    SAL_WARN_IF(nError != kCGLNoError, "vcl.opengl", "error in makeCurrent");
 #elif defined( IOS ) || defined( ANDROID )
     // nothing
 #elif defined( UNX )
@@ -863,8 +841,6 @@ void OpenGLContext::resetCurrent()
 #if defined( WNT )
     wglMakeCurrent( m_aGLWin.hDC, 0 );
 #elif defined( MACOSX )
-    CGLError nError = CGLSetCurrentContext(NULL);
-    SAL_WARN_IF(nError != kCGLNoError, "vcl.opengl", "error in makeCurrent");
 #elif defined( IOS ) || defined( ANDROID )
     // nothing
 #elif defined( UNX )
@@ -877,7 +853,6 @@ void OpenGLContext::swapBuffers()
 #if defined( WNT )
     SwapBuffers(m_aGLWin.hDC);
 #elif defined( MACOSX )
-    CGLFlushDrawable(m_aGLWin.context);
 #elif defined( IOS ) || defined( ANDROID )
     // nothing
 #elif defined( UNX )
commit 004a0758d026d88822eaf780d70dd987633bc8ec
Author: Markus Mohrhard <markus.mohrhard at googlemail.com>
Date:   Thu Aug 28 01:37:10 2014 +0200

    use size_t instead of unsigned int for container indices
    
    Change-Id: Iff2f797915f1558ea23336e273bd26e0c0edc63e

diff --git a/slideshow/source/engine/OGLTrans/generic/OGLTrans_TransitionImpl.cxx b/slideshow/source/engine/OGLTrans/generic/OGLTrans_TransitionImpl.cxx
index 53524f8..2ccc375 100644
--- a/slideshow/source/engine/OGLTrans/generic/OGLTrans_TransitionImpl.cxx
+++ b/slideshow/source/engine/OGLTrans/generic/OGLTrans_TransitionImpl.cxx
@@ -80,7 +80,7 @@ void OGLTransitionImpl::setScene(TransitionScene const& rScene)
 void OGLTransitionImpl::prepare( ::sal_Int32 glLeavingSlideTex, ::sal_Int32 glEnteringSlideTex )
 {
     const SceneObjects_t& rSceneObjects(maScene.getSceneObjects());
-    for(unsigned int i(0); i != rSceneObjects.size(); ++i) {
+    for(size_t i(0); i != rSceneObjects.size(); ++i) {
         rSceneObjects[i]->prepare();
     }
 
@@ -90,7 +90,7 @@ void OGLTransitionImpl::prepare( ::sal_Int32 glLeavingSlideTex, ::sal_Int32 glEn
 void OGLTransitionImpl::finish()
 {
     const SceneObjects_t& rSceneObjects(maScene.getSceneObjects());
-    for(unsigned int i(0); i != rSceneObjects.size(); ++i) {
+    for(size_t i(0); i != rSceneObjects.size(); ++i) {
         rSceneObjects[i]->finish();
     }
 
@@ -189,7 +189,7 @@ void OGLTransitionImpl::display( double nTime, ::sal_Int32 glLeavingSlideTex, ::
 void OGLTransitionImpl::applyOverallOperations( double nTime, double SlideWidthScale, double SlideHeightScale )
 {
     const Operations_t& rOverallOperations(maScene.getOperations());
-    for(unsigned int i(0); i != rOverallOperations.size(); ++i)
+    for(size_t i(0); i != rOverallOperations.size(); ++i)
         rOverallOperations[i]->interpolate(nTime,SlideWidthScale,SlideHeightScale);
 }
 
@@ -217,7 +217,7 @@ OGLTransitionImpl::displaySlide(
         glTranslated( 0, 2 - surfaceLevel, 0 );
 
         glCullFace(GL_FRONT);
-        for(unsigned int i(0); i < primitives.size(); ++i)
+        for(size_t i(0); i < primitives.size(); ++i)
             primitives[i].display(nTime, SlideWidthScale, SlideHeightScale);
         glCullFace(GL_BACK);
 
@@ -226,7 +226,7 @@ OGLTransitionImpl::displaySlide(
         glPopMatrix();
     }
 
-    for(unsigned int i(0); i < primitives.size(); ++i)
+    for(size_t i(0); i < primitives.size(); ++i)
         primitives[i].display(nTime, SlideWidthScale, SlideHeightScale);
     CHECK_GL_ERROR();
 }
@@ -236,7 +236,7 @@ void OGLTransitionImpl::displayScene( double nTime, double SlideWidth, double Sl
     CHECK_GL_ERROR();
     const SceneObjects_t& rSceneObjects(maScene.getSceneObjects());
     glEnable(GL_TEXTURE_2D);
-    for(unsigned int i(0); i != rSceneObjects.size(); ++i)
+    for(size_t i(0); i != rSceneObjects.size(); ++i)
         rSceneObjects[i]->display(nTime, SlideWidth, SlideHeight, DispWidth, DispHeight);
     CHECK_GL_ERROR();
 }
@@ -276,7 +276,7 @@ void Primitive::display(double nTime, double WidthScale, double HeightScale) con
 void Primitive::applyOperations(double nTime, double WidthScale, double HeightScale) const
 {
     CHECK_GL_ERROR();
-    for(unsigned int i(0); i < Operations.size(); ++i)
+    for(size_t i(0); i < Operations.size(); ++i)
         Operations[i]->interpolate( nTime ,WidthScale,HeightScale);
     glScaled(WidthScale,HeightScale,1);
     CHECK_GL_ERROR();
@@ -285,7 +285,7 @@ void Primitive::applyOperations(double nTime, double WidthScale, double HeightSc
 void SceneObject::display(double nTime, double /* SlideWidth */, double /* SlideHeight */, double DispWidth, double DispHeight ) const
 {
     CHECK_GL_ERROR();
-    for(unsigned int i(0); i < maPrimitives.size(); ++i) {
+    for(size_t i(0); i < maPrimitives.size(); ++i) {
         // fixme: allow various model spaces, now we make it so that
         // it is regular -1,-1 to 1,1, where the whole display fits in
         CHECK_GL_ERROR();
commit beddc374b5ba541bd431332bf399f4f53020a91b
Author: Markus Mohrhard <markus.mohrhard at googlemail.com>
Date:   Thu Aug 28 00:25:30 2014 +0200

    the values are float now
    
    actually OpenGL does not like double that much
    
    Change-Id: I3267f46072194bb6b2d4705733408e3db44c8c08

diff --git a/slideshow/source/engine/OGLTrans/generic/OGLTrans_TransitionImpl.cxx b/slideshow/source/engine/OGLTrans/generic/OGLTrans_TransitionImpl.cxx
index 7e37e0e..53524f8 100644
--- a/slideshow/source/engine/OGLTrans/generic/OGLTrans_TransitionImpl.cxx
+++ b/slideshow/source/engine/OGLTrans/generic/OGLTrans_TransitionImpl.cxx
@@ -255,7 +255,7 @@ void Primitive::display(double nTime, double WidthScale, double HeightScale) con
     if(!Normals.empty())
     {
         CHECK_GL_ERROR();
-        glNormalPointer( GL_DOUBLE , 0 , &Normals[0] );
+        glNormalPointer( GL_FLOAT , 0 , &Normals[0] );
         CHECK_GL_ERROR();
         glEnableClientState( GL_NORMAL_ARRAY );
         CHECK_GL_ERROR();
@@ -263,9 +263,9 @@ void Primitive::display(double nTime, double WidthScale, double HeightScale) con
     CHECK_GL_ERROR();
     glEnableClientState( GL_TEXTURE_COORD_ARRAY );
     CHECK_GL_ERROR();
-    glTexCoordPointer( 2, GL_DOUBLE, 0, &TexCoords[0] );
+    glTexCoordPointer( 2, GL_FLOAT, 0, &TexCoords[0] );
     CHECK_GL_ERROR();
-    glVertexPointer( 3, GL_DOUBLE, 0, &Vertices[0] );
+    glVertexPointer( 3, GL_FLOAT, 0, &Vertices[0] );
     CHECK_GL_ERROR();
     glDrawArrays( GL_TRIANGLES, 0, Vertices.size() );
     CHECK_GL_ERROR();
commit 455ec6d021cb10d4166137727427762e114ed150
Author: Markus Mohrhard <markus.mohrhard at googlemail.com>
Date:   Wed Aug 27 19:28:22 2014 +0200

    remove that ugly underscore at the end of the method names
    
    Change-Id: I3c81c9d8b89ddf18bdc5ae700b721ca71f2700bb

diff --git a/slideshow/source/engine/OGLTrans/generic/OGLTrans_TransitionImpl.cxx b/slideshow/source/engine/OGLTrans/generic/OGLTrans_TransitionImpl.cxx
index f2c94ef..7e37e0e 100644
--- a/slideshow/source/engine/OGLTrans/generic/OGLTrans_TransitionImpl.cxx
+++ b/slideshow/source/engine/OGLTrans/generic/OGLTrans_TransitionImpl.cxx
@@ -84,7 +84,7 @@ void OGLTransitionImpl::prepare( ::sal_Int32 glLeavingSlideTex, ::sal_Int32 glEn
         rSceneObjects[i]->prepare();
     }
 
-    prepareTransition_( glLeavingSlideTex, glEnteringSlideTex );
+    prepareTransition( glLeavingSlideTex, glEnteringSlideTex );
 }
 
 void OGLTransitionImpl::finish()
@@ -94,7 +94,7 @@ void OGLTransitionImpl::finish()
         rSceneObjects[i]->finish();
     }
 
-    finishTransition_();
+    finishTransition();
 }
 
 static void blendSlide( double depth )
@@ -144,15 +144,15 @@ static void slideShadow( double nTime, const Primitive& primitive, double sw, do
     CHECK_GL_ERROR();
 }
 
-void OGLTransitionImpl::prepare_( double, double, double, double, double )
+void OGLTransitionImpl::prepare( double, double, double, double, double )
 {
 }
 
-void OGLTransitionImpl::prepareTransition_( ::sal_Int32, ::sal_Int32 )
+void OGLTransitionImpl::prepareTransition( ::sal_Int32, ::sal_Int32 )
 {
 }
 
-void OGLTransitionImpl::finishTransition_()
+void OGLTransitionImpl::finishTransition()
 {
 }
 
@@ -173,7 +173,7 @@ void OGLTransitionImpl::display( double nTime, ::sal_Int32 glLeavingSlideTex, ::
     const double SlideHeightScale = SlideHeight/DispHeight;
 
     CHECK_GL_ERROR();
-    prepare_( nTime, SlideWidth, SlideHeight, DispWidth, DispHeight );
+    prepare( nTime, SlideWidth, SlideHeight, DispWidth, DispHeight );
 
     CHECK_GL_ERROR();
     glPushMatrix();
@@ -1132,11 +1132,11 @@ public:
         {}
 
 private:
-    virtual void prepare_( double nTime, double SlideWidth, double SlideHeight, double DispWidth, double DispHeight ) SAL_OVERRIDE;
+    virtual void prepare( double nTime, double SlideWidth, double SlideHeight, double DispWidth, double DispHeight ) SAL_OVERRIDE;
     // mmPrepare = &OGLTransitionImpl::prepareDiamond;
 };
 
-void DiamondTransition::prepare_( double nTime, double /* SlideWidth */, double /* SlideHeight */, double /* DispWidth */, double /* DispHeight */ )
+void DiamondTransition::prepare( double nTime, double /* SlideWidth */, double /* SlideHeight */, double /* DispWidth */, double /* DispHeight */ )
 {
     Primitive Slide1, Slide2;
 
@@ -1390,9 +1390,9 @@ protected:
 
 private:
     virtual void displaySlides_( double nTime, ::sal_Int32 glLeavingSlideTex, ::sal_Int32 glEnteringSlideTex, double SlideWidthScale, double SlideHeightScale ) SAL_OVERRIDE;
-    virtual void prepareTransition_( ::sal_Int32 glLeavingSlideTex, ::sal_Int32 glEnteringSlideTex ) SAL_OVERRIDE;
-    virtual void finishTransition_() SAL_OVERRIDE;
-    virtual GLuint makeShader_() = 0;
+    virtual void prepareTransition( ::sal_Int32 glLeavingSlideTex, ::sal_Int32 glEnteringSlideTex ) SAL_OVERRIDE;
+    virtual void finishTransition() SAL_OVERRIDE;
+    virtual GLuint makeShader() = 0;
 
     void impl_preparePermShader();
 
@@ -1426,14 +1426,14 @@ void ShaderTransition::displaySlides_( double nTime, ::sal_Int32 glLeavingSlideT
     CHECK_GL_ERROR();
 }
 
-void ShaderTransition::prepareTransition_( ::sal_Int32 /* glLeavingSlideTex */, ::sal_Int32 /* glEnteringSlideTex */ )
+void ShaderTransition::prepareTransition( ::sal_Int32 /* glLeavingSlideTex */, ::sal_Int32 /* glEnteringSlideTex */ )
 {
-    m_nProgramObject = makeShader_();
+    m_nProgramObject = makeShader();
 
     impl_preparePermShader();
 }
 
-void ShaderTransition::finishTransition_()
+void ShaderTransition::finishTransition()
 {
     CHECK_GL_ERROR();
     if( m_nProgramObject ) {
@@ -1549,10 +1549,10 @@ public:
     {}
 
 private:
-    virtual GLuint makeShader_() SAL_OVERRIDE;
+    virtual GLuint makeShader() SAL_OVERRIDE;
 };
 
-GLuint StaticNoiseTransition::makeShader_()
+GLuint StaticNoiseTransition::makeShader()
 {
     return OpenGLHelper::LoadShaders( "basicVertexShader", "staticFragmentShader" );
 }
@@ -1600,10 +1600,10 @@ public:
     {}
 
 private:
-    virtual GLuint makeShader_() SAL_OVERRIDE;
+    virtual GLuint makeShader() SAL_OVERRIDE;
 };
 
-GLuint DissolveTransition::makeShader_()
+GLuint DissolveTransition::makeShader()
 {
     return OpenGLHelper::LoadShaders( "basicVertexShader", "dissolveFragmentShader" );
 }
diff --git a/slideshow/source/engine/OGLTrans/generic/OGLTrans_TransitionImpl.hxx b/slideshow/source/engine/OGLTrans/generic/OGLTrans_TransitionImpl.hxx
index 460b3bf..f49f2d6 100644
--- a/slideshow/source/engine/OGLTrans/generic/OGLTrans_TransitionImpl.hxx
+++ b/slideshow/source/engine/OGLTrans/generic/OGLTrans_TransitionImpl.hxx
@@ -187,19 +187,19 @@ private:
       *
       * Default implementation does nothing.
       */
-    virtual void prepare_( double nTime, double SlideWidth, double SlideHeight, double DispWidth, double DispHeight );
+    virtual void prepare( double nTime, double SlideWidth, double SlideHeight, double DispWidth, double DispHeight );
 
     /** This function is called after glx context is ready to let the transition prepare GL related things, like GLSL program.
       *
       * Default implementation does nothing.
       */
-    virtual void prepareTransition_( ::sal_Int32 glLeavingSlideTex, ::sal_Int32 glEnteringSlideTex );
+    virtual void prepareTransition( ::sal_Int32 glLeavingSlideTex, ::sal_Int32 glEnteringSlideTex );
 
     /** This function is called when the transition needs to clear after itself, like delete own textures etc.
       *
       * Default implementation does nothing.
       */
-    virtual void finishTransition_();
+    virtual void finishTransition();
 
     /** This function is called in display method to display the slides.
       *
commit bb143495b2c6c5c647a926f059d82a5c8f8e5d65
Author: Markus Mohrhard <markus.mohrhard at googlemail.com>
Date:   Wed Aug 27 17:44:59 2014 +0200

    basegfx -> glm in OGLTrans
    
    Change-Id: I3f3002d975f3ee2732c5e132b3b67531356aad5c

diff --git a/slideshow/Library_OGLTrans.mk b/slideshow/Library_OGLTrans.mk
index 20596b5..6a9d2ac 100644
--- a/slideshow/Library_OGLTrans.mk
+++ b/slideshow/Library_OGLTrans.mk
@@ -39,6 +39,7 @@ $(eval $(call gb_Library_use_externals,OGLTrans,\
 	boost_headers \
 	glew \
 	mesa_headers \
+	glm_headers \
 ))
 
 $(eval $(call gb_Library_set_componentfile,OGLTrans,slideshow/source/engine/OGLTrans/ogltrans))
diff --git a/slideshow/source/engine/OGLTrans/generic/OGLTrans_TransitionImpl.cxx b/slideshow/source/engine/OGLTrans/generic/OGLTrans_TransitionImpl.cxx
index 17bdff5..f2c94ef 100644
--- a/slideshow/source/engine/OGLTrans/generic/OGLTrans_TransitionImpl.cxx
+++ b/slideshow/source/engine/OGLTrans/generic/OGLTrans_TransitionImpl.cxx
@@ -424,19 +424,19 @@ boost::shared_ptr<OGLTransitionImpl> makeOutsideCubeFaceToLeft()
 {
     Primitive Slide;
 
-    Slide.pushTriangle(basegfx::B2DVector(0,0),basegfx::B2DVector(1,0),basegfx::B2DVector(0,1));
-    Slide.pushTriangle(basegfx::B2DVector(1,0),basegfx::B2DVector(0,1),basegfx::B2DVector(1,1));
+    Slide.pushTriangle(glm::vec2(0,0),glm::vec2(1,0),glm::vec2(0,1));
+    Slide.pushTriangle(glm::vec2(1,0),glm::vec2(0,1),glm::vec2(1,1));
 
     Primitives_t aLeavingPrimitives;
     aLeavingPrimitives.push_back(Slide);
 
-    Slide.Operations.push_back(makeRotateAndScaleDepthByWidth(basegfx::B3DVector(0,1,0),basegfx::B3DVector(0,0,-1),90,false,0.0,1.0));
+    Slide.Operations.push_back(makeRotateAndScaleDepthByWidth(glm::vec3(0,1,0),glm::vec3(0,0,-1),90,false,0.0,1.0));
 
     Primitives_t aEnteringPrimitives;
     aEnteringPrimitives.push_back(Slide);
 
     Operations_t aOperations;
-    aOperations.push_back(makeRotateAndScaleDepthByWidth(basegfx::B3DVector(0,1,0),basegfx::B3DVector(0,0,-1),-90,true,0.0,1.0));
+    aOperations.push_back(makeRotateAndScaleDepthByWidth(glm::vec3(0,1,0),glm::vec3(0,0,-1),-90,true,0.0,1.0));
 
     return makeSimpleTransition(aLeavingPrimitives, aEnteringPrimitives, aOperations);
 }
@@ -445,19 +445,19 @@ boost::shared_ptr<OGLTransitionImpl> makeInsideCubeFaceToLeft()
 {
     Primitive Slide;
 
-    Slide.pushTriangle(basegfx::B2DVector(0,0),basegfx::B2DVector(1,0),basegfx::B2DVector(0,1));
-    Slide.pushTriangle(basegfx::B2DVector(1,0),basegfx::B2DVector(0,1),basegfx::B2DVector(1,1));
+    Slide.pushTriangle(glm::vec2(0,0),glm::vec2(1,0),glm::vec2(0,1));
+    Slide.pushTriangle(glm::vec2(1,0),glm::vec2(0,1),glm::vec2(1,1));
 
     Primitives_t aLeavingPrimitives;
     aLeavingPrimitives.push_back(Slide);
 
-    Slide.Operations.push_back(makeRotateAndScaleDepthByWidth(basegfx::B3DVector(0,1,0),basegfx::B3DVector(0,0,1),-90,false,0.0,1.0));
+    Slide.Operations.push_back(makeRotateAndScaleDepthByWidth(glm::vec3(0,1,0),glm::vec3(0,0,1),-90,false,0.0,1.0));
 
     Primitives_t aEnteringPrimitives;
     aEnteringPrimitives.push_back(Slide);
 
     Operations_t aOperations;
-    aOperations.push_back(makeRotateAndScaleDepthByWidth(basegfx::B3DVector(0,1,0),basegfx::B3DVector(0,0,1),90,true,0.0,1.0));
+    aOperations.push_back(makeRotateAndScaleDepthByWidth(glm::vec3(0,1,0),glm::vec3(0,0,1),90,true,0.0,1.0));
 
     return makeSimpleTransition(aLeavingPrimitives, aEnteringPrimitives, aOperations);
 }
@@ -466,13 +466,13 @@ boost::shared_ptr<OGLTransitionImpl> makeFallLeaving()
 {
     Primitive Slide;
 
-    Slide.pushTriangle(basegfx::B2DVector(0,0),basegfx::B2DVector(1,0),basegfx::B2DVector(0,1));
-    Slide.pushTriangle(basegfx::B2DVector(1,0),basegfx::B2DVector(0,1),basegfx::B2DVector(1,1));
+    Slide.pushTriangle(glm::vec2(0,0),glm::vec2(1,0),glm::vec2(0,1));
+    Slide.pushTriangle(glm::vec2(1,0),glm::vec2(0,1),glm::vec2(1,1));
 
     Primitives_t aEnteringPrimitives;
     aEnteringPrimitives.push_back(Slide);
 
-    Slide.Operations.push_back(makeRotateAndScaleDepthByWidth(basegfx::B3DVector(1,0,0),basegfx::B3DVector(0,-1,0), 90,true,0.0,1.0));
+    Slide.Operations.push_back(makeRotateAndScaleDepthByWidth(glm::vec3(1,0,0),glm::vec3(0,-1,0), 90,true,0.0,1.0));
     Primitives_t aLeavingPrimitives;
     aLeavingPrimitives.push_back(Slide);
 
@@ -489,19 +489,19 @@ boost::shared_ptr<OGLTransitionImpl> makeTurnAround()
     TransitionSettings aSettings;
     aSettings.mbReflectSlides = true;
 
-    Slide.pushTriangle(basegfx::B2DVector(0,0),basegfx::B2DVector(1,0),basegfx::B2DVector(0,1));
-    Slide.pushTriangle(basegfx::B2DVector(1,0),basegfx::B2DVector(0,1),basegfx::B2DVector(1,1));
+    Slide.pushTriangle(glm::vec2(0,0),glm::vec2(1,0),glm::vec2(0,1));
+    Slide.pushTriangle(glm::vec2(1,0),glm::vec2(0,1),glm::vec2(1,1));
     Primitives_t aLeavingPrimitives;
     aLeavingPrimitives.push_back(Slide);
 
-    Slide.Operations.push_back(makeRotateAndScaleDepthByWidth(basegfx::B3DVector(0,1,0),basegfx::B3DVector(0,0,0),-180,false,0.0,1.0));
+    Slide.Operations.push_back(makeRotateAndScaleDepthByWidth(glm::vec3(0,1,0),glm::vec3(0,0,0),-180,false,0.0,1.0));
     Primitives_t aEnteringPrimitives;
     aEnteringPrimitives.push_back(Slide);
 
     Operations_t aOperations;
-    aOperations.push_back(makeSTranslate(basegfx::B3DVector(0, 0, -1.5),true, 0, 0.5));
-    aOperations.push_back(makeSTranslate(basegfx::B3DVector(0, 0, 1.5), true, 0.5, 1));
-    aOperations.push_back(makeRotateAndScaleDepthByWidth(basegfx::B3DVector(0, 1, 0),basegfx::B3DVector(0, 0, 0), -180, true, 0.0, 1.0));
+    aOperations.push_back(makeSTranslate(glm::vec3(0, 0, -1.5),true, 0, 0.5));
+    aOperations.push_back(makeSTranslate(glm::vec3(0, 0, 1.5), true, 0.5, 1));
+    aOperations.push_back(makeRotateAndScaleDepthByWidth(glm::vec3(0, 1, 0),glm::vec3(0, 0, 0), -180, true, 0.0, 1.0));
 
     return makeSimpleTransition(aLeavingPrimitives, aEnteringPrimitives, aOperations, aSettings);
 }
@@ -510,14 +510,14 @@ boost::shared_ptr<OGLTransitionImpl> makeTurnDown()
 {
     Primitive Slide;
 
-    Slide.pushTriangle(basegfx::B2DVector(0,0),basegfx::B2DVector(1,0),basegfx::B2DVector(0,1));
-    Slide.pushTriangle(basegfx::B2DVector(1,0),basegfx::B2DVector(0,1),basegfx::B2DVector(1,1));
+    Slide.pushTriangle(glm::vec2(0,0),glm::vec2(1,0),glm::vec2(0,1));
+    Slide.pushTriangle(glm::vec2(1,0),glm::vec2(0,1),glm::vec2(1,1));
     Primitives_t aLeavingPrimitives;
     aLeavingPrimitives.push_back(Slide);
 
-    Slide.Operations.push_back(makeSTranslate(basegfx::B3DVector(0, 0, 0.0001), false, -1.0, 0.0));
-    Slide.Operations.push_back(makeSRotate (basegfx::B3DVector(0, 0, 1), basegfx::B3DVector(-1, 1, 0), -90, true, 0.0, 1.0));
-    Slide.Operations.push_back(makeSRotate (basegfx::B3DVector(0, 0, 1), basegfx::B3DVector(-1, 1, 0), 90, false, -1.0, 0.0));
+    Slide.Operations.push_back(makeSTranslate(glm::vec3(0, 0, 0.0001), false, -1.0, 0.0));
+    Slide.Operations.push_back(makeSRotate (glm::vec3(0, 0, 1), glm::vec3(-1, 1, 0), -90, true, 0.0, 1.0));
+    Slide.Operations.push_back(makeSRotate (glm::vec3(0, 0, 1), glm::vec3(-1, 1, 0), 90, false, -1.0, 0.0));
     Primitives_t aEnteringPrimitives;
     aEnteringPrimitives.push_back(Slide);
 
@@ -531,13 +531,13 @@ boost::shared_ptr<OGLTransitionImpl> makeIris()
 {
     Primitive Slide;
 
-    Slide.pushTriangle (basegfx::B2DVector (0,0), basegfx::B2DVector (1,0), basegfx::B2DVector (0,1));
-    Slide.pushTriangle (basegfx::B2DVector (1,0), basegfx::B2DVector (0,1), basegfx::B2DVector (1,1));
+    Slide.pushTriangle (glm::vec2 (0,0), glm::vec2 (1,0), glm::vec2 (0,1));
+    Slide.pushTriangle (glm::vec2 (1,0), glm::vec2 (0,1), glm::vec2 (1,1));
     Primitives_t aEnteringPrimitives;
     aEnteringPrimitives.push_back (Slide);
 
-    Slide.Operations.push_back (makeSTranslate (basegfx::B3DVector (0, 0,  0.000001), false, -1, 0));
-    Slide.Operations.push_back (makeSTranslate (basegfx::B3DVector (0, 0, -0.000002), false, 0.5, 1));
+    Slide.Operations.push_back (makeSTranslate (glm::vec3 (0, 0,  0.000001), false, -1, 0));
+    Slide.Operations.push_back (makeSTranslate (glm::vec3 (0, 0, -0.000002), false, 0.5, 1));
     Primitives_t aLeavingPrimitives;
     aLeavingPrimitives.push_back (Slide);
 
@@ -557,12 +557,12 @@ boost::shared_ptr<OGLTransitionImpl> makeIris()
         cyo = (of*y + 1)/2;
         lcxo = (of*lx + 1)/2;
         lcyo = (of*ly + 1)/2;
-        irisPart.pushTriangle (basegfx::B2DVector (lcx, lcy),
-                               basegfx::B2DVector (lcxo, lcyo),
-                               basegfx::B2DVector (cx, cy));
-        irisPart.pushTriangle (basegfx::B2DVector (cx, cy),
-                               basegfx::B2DVector (lcxo, lcyo),
-                               basegfx::B2DVector (cxo, cyo));
+        irisPart.pushTriangle (glm::vec2 (lcx, lcy),
+                               glm::vec2 (lcxo, lcyo),
+                               glm::vec2 (cx, cy));
+        irisPart.pushTriangle (glm::vec2 (cx, cy),
+                               glm::vec2 (lcxo, lcyo),
+                               glm::vec2 (cxo, cyo));
         lx = x;
         ly = y;
         t += 1.0/nSteps;
@@ -577,15 +577,15 @@ boost::shared_ptr<OGLTransitionImpl> makeIris()
 
         rx = cos ((2*M_PI*i)/nParts);
         ry = sin ((2*M_PI*i)/nParts);
-        irisPart.Operations.push_back (makeSRotate (basegfx::B3DVector(0, 0, 1), basegfx::B3DVector(rx, ry, 0),  angle, true, 0.0, 0.5));
-        irisPart.Operations.push_back (makeSRotate (basegfx::B3DVector(0, 0, 1), basegfx::B3DVector(rx, ry, 0), -angle, true, 0.5, 1));
+        irisPart.Operations.push_back (makeSRotate (glm::vec3(0, 0, 1), glm::vec3(rx, ry, 0),  angle, true, 0.0, 0.5));
+        irisPart.Operations.push_back (makeSRotate (glm::vec3(0, 0, 1), glm::vec3(rx, ry, 0), -angle, true, 0.5, 1));
         if (i > 0) {
-            irisPart.Operations.push_back (makeSTranslate (basegfx::B3DVector(rx, ry, 0),  false, -1, 0));
-            irisPart.Operations.push_back (makeSRotate (basegfx::B3DVector(0, 0, 1), basegfx::B3DVector(0, 0, 0), i*360.0/nParts, false, -1, 0));
-            irisPart.Operations.push_back (makeSTranslate (basegfx::B3DVector(-1, 0, 0),  false, -1, 0));
+            irisPart.Operations.push_back (makeSTranslate (glm::vec3(rx, ry, 0),  false, -1, 0));
+            irisPart.Operations.push_back (makeSRotate (glm::vec3(0, 0, 1), glm::vec3(0, 0, 0), i*360.0/nParts, false, -1, 0));
+            irisPart.Operations.push_back (makeSTranslate (glm::vec3(-1, 0, 0),  false, -1, 0));
         }
-        irisPart.Operations.push_back(makeSTranslate(basegfx::B3DVector(0, 0, 1), false, -2, 0.0));
-        irisPart.Operations.push_back (makeSRotate (basegfx::B3DVector(1, .5, 0), basegfx::B3DVector(1, 0, 0), -30, false, -1, 0));
+        irisPart.Operations.push_back(makeSTranslate(glm::vec3(0, 0, 1), false, -2, 0.0));
+        irisPart.Operations.push_back (makeSRotate (glm::vec3(1, .5, 0), glm::vec3(1, 0, 0), -30, false, -1, 0));
         pIris->pushPrimitive (irisPart);
     }
 
@@ -653,42 +653,41 @@ boost::shared_ptr<OGLTransitionImpl> makeRochade()
     w = 2.2;
     h = 10;
 
-    Slide.pushTriangle(basegfx::B2DVector(0,0),basegfx::B2DVector(1,0),basegfx::B2DVector(0,1));
-    Slide.pushTriangle(basegfx::B2DVector(1,0),basegfx::B2DVector(0,1),basegfx::B2DVector(1,1));
+    Slide.pushTriangle(glm::vec2(0,0),glm::vec2(1,0),glm::vec2(0,1));
+    Slide.pushTriangle(glm::vec2(1,0),glm::vec2(0,1),glm::vec2(1,1));
 
     Slide.Operations.push_back(makeSEllipseTranslate(w, h, 0.25, -0.25, true, 0, 1));
-    Slide.Operations.push_back(makeRotateAndScaleDepthByWidth(basegfx::B3DVector(0,1,0),basegfx::B3DVector(0,0,0), -45, true, 0, 1));
+    Slide.Operations.push_back(makeRotateAndScaleDepthByWidth(glm::vec3(0,1,0),glm::vec3(0,0,0), -45, true, 0, 1));
     Primitives_t aLeavingSlide;
     aLeavingSlide.push_back(Slide);
 
     Slide.Operations.clear();
     Slide.Operations.push_back(makeSEllipseTranslate(w, h, 0.75, 0.25, true, 0, 1));
-    Slide.Operations.push_back(makeSTranslate(basegfx::B3DVector(0, 0, -h), false, -1, 0));
-    Slide.Operations.push_back(makeRotateAndScaleDepthByWidth(basegfx::B3DVector(0,1,0),basegfx::B3DVector(0,0,0), -45, true, 0, 1));
-    Slide.Operations.push_back(makeRotateAndScaleDepthByWidth(basegfx::B3DVector(0,1,0),basegfx::B3DVector(0,0,0), 45, false, -1, 0));
+    Slide.Operations.push_back(makeSTranslate(glm::vec3(0, 0, -h), false, -1, 0));
+    Slide.Operations.push_back(makeRotateAndScaleDepthByWidth(glm::vec3(0,1,0),glm::vec3(0,0,0), -45, true, 0, 1));
+    Slide.Operations.push_back(makeRotateAndScaleDepthByWidth(glm::vec3(0,1,0),glm::vec3(0,0,0), 45, false, -1, 0));
     Primitives_t aEnteringSlide;
     aEnteringSlide.push_back(Slide);
 
     return makeRochadeTransition(aLeavingSlide, aEnteringSlide, aSettings);
 }
 
-// TODO(Q3): extract to basegfx
-inline basegfx::B2DVector clamp(const basegfx::B2DVector& v)
-{
-    return basegfx::B2DVector(min(max(v.getX(),-1.0),1.0),
-                              min(max(v.getY(),-1.0),1.0));
-}
-
 inline double randFromNeg1to1()
 {
     return ( ( static_cast<double>( rand() ) / static_cast<double>( RAND_MAX ) ) * 2.0 ) - 1.0;
 }
 
 // TODO(Q3): extract to basegfx
-inline basegfx::B3DVector randNormVectorInXYPlane()
+inline glm::vec3 randNormVectorInXYPlane()
+{
+    glm::vec3 toReturn(randFromNeg1to1(),randFromNeg1to1(),0.0);
+    return glm::normalize(toReturn);
+}
+
+template<typename T>
+T clamp(const T& rIn)
 {
-    basegfx::B3DVector toReturn(randFromNeg1to1(),randFromNeg1to1(),0.0);
-    return toReturn/toReturn.getLength();
+    return glm::clamp(rIn, -1.0, 1.0);
 }
 
 boost::shared_ptr<OGLTransitionImpl> makeRevolvingCircles( ::sal_uInt16 nCircles , ::sal_uInt16 nPointsOnCircles )
@@ -699,21 +698,21 @@ boost::shared_ptr<OGLTransitionImpl> makeRevolvingCircles( ::sal_uInt16 nCircles
         makeNByMTileFlip(1,1);
         return makeSimpleTransition();
     }
-    double Radius(1.0/static_cast<double>( nCircles ));
-    double dRadius(Radius);
-    double LastRadius(0.0);
-    double NextRadius(2*Radius);
+    float Radius(1.0/static_cast<double>( nCircles ));
+    float dRadius(Radius);
+    float LastRadius(0.0);
+    float NextRadius(2*Radius);
 
     /// now we know there is at least two circles
     /// the first will always be a full circle
     /// the last will always be the outer shell of the slide with a circle hole
 
     //add the full circle
-    vector<basegfx::B2DVector> unScaledTexCoords;
-    double TempAngle(0.0);
+    vector<glm::vec2> unScaledTexCoords;
+    float TempAngle(0.0);
     for(unsigned int Point(0); Point < nPointsOnCircles; ++Point)
     {
-        unScaledTexCoords.push_back( basegfx::B2DVector( cos(TempAngle - 3.1415926/2.0) , sin(TempAngle- 3.1415926/2.0) ) );
+        unScaledTexCoords.push_back( glm::vec2( cos(TempAngle - 3.1415926/2.0) , sin(TempAngle- 3.1415926/2.0) ) );
 
         TempAngle += dAngle;
     }
@@ -725,16 +724,16 @@ boost::shared_ptr<OGLTransitionImpl> makeRevolvingCircles( ::sal_uInt16 nCircles
         Primitive LeavingSlide;
         for(int Point(0); Point + 1 < nPointsOnCircles; ++Point)
         {
-            EnteringSlide.pushTriangle( basegfx::B2DVector( 0.5 , 0.5 ) , Radius * unScaledTexCoords[ Point + 1 ] / 2.0 + basegfx::B2DVector( 0.5 , 0.5 ) , Radius * unScaledTexCoords[ Point ] / 2.0 + basegfx::B2DVector( 0.5 , 0.5 ) );
-            LeavingSlide.pushTriangle( basegfx::B2DVector( 0.5 , 0.5 ) , Radius * unScaledTexCoords[ Point + 1 ] / 2.0 + basegfx::B2DVector( 0.5 , 0.5 ) , Radius * unScaledTexCoords[ Point ] / 2.0 + basegfx::B2DVector( 0.5, 0.5) );
+            EnteringSlide.pushTriangle( glm::vec2( 0.5 , 0.5 ) , Radius * unScaledTexCoords[ Point + 1 ] / 2.0f + glm::vec2( 0.5 , 0.5 ) , Radius * unScaledTexCoords[ Point ] / 2.0f + glm::vec2( 0.5 , 0.5 ) );
+            LeavingSlide.pushTriangle( glm::vec2( 0.5 , 0.5 ) , Radius * unScaledTexCoords[ Point + 1 ] / 2.0f + glm::vec2( 0.5 , 0.5 ) , Radius * unScaledTexCoords[ Point ] / 2.0f + glm::vec2( 0.5, 0.5) );
         }
-        EnteringSlide.pushTriangle( basegfx::B2DVector(0.5,0.5) , Radius * unScaledTexCoords[ 0 ] / 2.0 + basegfx::B2DVector( 0.5 , 0.5 ) , Radius * unScaledTexCoords[ nPointsOnCircles - 1 ] / 2.0 + basegfx::B2DVector( 0.5 , 0.5 ) );
-        LeavingSlide.pushTriangle( basegfx::B2DVector(0.5,0.5) , Radius*unScaledTexCoords[0]/2.0 + basegfx::B2DVector(0.5,0.5) , Radius*unScaledTexCoords[nPointsOnCircles - 1]/2.0 + basegfx::B2DVector(0.5,0.5) );
+        EnteringSlide.pushTriangle( glm::vec2(0.5,0.5) , Radius * unScaledTexCoords[ 0 ] / 2.0f + glm::vec2( 0.5 , 0.5 ) , Radius * unScaledTexCoords[ nPointsOnCircles - 1 ] / 2.0f + glm::vec2( 0.5 , 0.5 ) );
+        LeavingSlide.pushTriangle( glm::vec2(0.5,0.5) , Radius*unScaledTexCoords[0]/2.0f + glm::vec2(0.5,0.5) , Radius*unScaledTexCoords[nPointsOnCircles - 1]/2.0f + glm::vec2(0.5,0.5) );
 
-        basegfx::B3DVector axis(randNormVectorInXYPlane());
-        EnteringSlide.Operations.push_back( makeSRotate( axis , basegfx::B3DVector(0,0,0) , 180, true, Radius/2.0 , (NextRadius + 1)/2.0 ) );
-        LeavingSlide.Operations.push_back( makeSRotate( axis , basegfx::B3DVector(0,0,0) , 180, true, Radius/2.0 , (NextRadius + 1)/2.0 ) );
-        EnteringSlide.Operations.push_back( makeSRotate( axis , basegfx::B3DVector(0,0,0) , -180, false,0.0,1.0) );
+        glm::vec3 axis(randNormVectorInXYPlane());
+        EnteringSlide.Operations.push_back( makeSRotate( axis , glm::vec3(0,0,0) , 180, true, Radius/2.0 , (NextRadius + 1)/2.0 ) );
+        LeavingSlide.Operations.push_back( makeSRotate( axis , glm::vec3(0,0,0) , 180, true, Radius/2.0 , (NextRadius + 1)/2.0 ) );
+        EnteringSlide.Operations.push_back( makeSRotate( axis , glm::vec3(0,0,0) , -180, false,0.0,1.0) );
 
         aEnteringSlide.push_back(EnteringSlide);
         aLeavingSlide.push_back(LeavingSlide);
@@ -749,23 +748,23 @@ boost::shared_ptr<OGLTransitionImpl> makeRevolvingCircles( ::sal_uInt16 nCircles
         Primitive EnteringSlide;
         for(int Side(0); Side < nPointsOnCircles - 1; ++Side)
         {
-            EnteringSlide.pushTriangle(Radius*unScaledTexCoords[Side]/2.0 + basegfx::B2DVector(0.5,0.5) , LastRadius*unScaledTexCoords[Side]/2.0 + basegfx::B2DVector(0.5,0.5) , LastRadius*unScaledTexCoords[Side + 1]/2.0 + basegfx::B2DVector(0.5,0.5) );
-            EnteringSlide.pushTriangle(Radius*unScaledTexCoords[Side]/2.0 + basegfx::B2DVector(0.5,0.5) , LastRadius*unScaledTexCoords[Side + 1]/2.0 + basegfx::B2DVector(0.5,0.5) , Radius*unScaledTexCoords[Side + 1]/2.0 + basegfx::B2DVector(0.5,0.5) );
+            EnteringSlide.pushTriangle(Radius*unScaledTexCoords[Side]/2.0f + glm::vec2(0.5,0.5) , LastRadius*unScaledTexCoords[Side]/2.0f + glm::vec2(0.5,0.5) , LastRadius*unScaledTexCoords[Side + 1]/2.0f + glm::vec2(0.5,0.5) );
+            EnteringSlide.pushTriangle(Radius*unScaledTexCoords[Side]/2.0f + glm::vec2(0.5,0.5) , LastRadius*unScaledTexCoords[Side + 1]/2.0f + glm::vec2(0.5,0.5) , Radius*unScaledTexCoords[Side + 1]/2.0f + glm::vec2(0.5,0.5) );
 
-            LeavingSlide.pushTriangle(Radius*unScaledTexCoords[Side]/2.0 + basegfx::B2DVector(0.5,0.5) , LastRadius*unScaledTexCoords[Side]/2.0 + basegfx::B2DVector(0.5,0.5) , LastRadius*unScaledTexCoords[Side + 1]/2.0 + basegfx::B2DVector(0.5,0.5) );
-            LeavingSlide.pushTriangle(Radius*unScaledTexCoords[Side]/2.0 + basegfx::B2DVector(0.5,0.5) , LastRadius*unScaledTexCoords[Side + 1]/2.0 + basegfx::B2DVector(0.5,0.5) , Radius*unScaledTexCoords[Side + 1]/2.0 + basegfx::B2DVector(0.5,0.5) );
+            LeavingSlide.pushTriangle(Radius*unScaledTexCoords[Side]/2.0f + glm::vec2(0.5,0.5) , LastRadius*unScaledTexCoords[Side]/2.0f + glm::vec2(0.5,0.5) , LastRadius*unScaledTexCoords[Side + 1]/2.0f + glm::vec2(0.5,0.5) );
+            LeavingSlide.pushTriangle(Radius*unScaledTexCoords[Side]/2.0f + glm::vec2(0.5,0.5) , LastRadius*unScaledTexCoords[Side + 1]/2.0f + glm::vec2(0.5,0.5) , Radius*unScaledTexCoords[Side + 1]/2.0f + glm::vec2(0.5,0.5) );
         }
 
-        EnteringSlide.pushTriangle(Radius*unScaledTexCoords[nPointsOnCircles - 1]/2.0 + basegfx::B2DVector(0.5,0.5) , LastRadius*unScaledTexCoords[nPointsOnCircles - 1]/2.0 + basegfx::B2DVector(0.5,0.5) , LastRadius*unScaledTexCoords[0]/2.0 + basegfx::B2DVector(0.5,0.5) );
-        EnteringSlide.pushTriangle(Radius*unScaledTexCoords[nPointsOnCircles - 1]/2.0 + basegfx::B2DVector(0.5,0.5) , LastRadius*unScaledTexCoords[0]/2.0 + basegfx::B2DVector(0.5,0.5) , Radius*unScaledTexCoords[0]/2.0 + basegfx::B2DVector(0.5,0.5) );
+        EnteringSlide.pushTriangle(Radius*unScaledTexCoords[nPointsOnCircles - 1]/2.0f + glm::vec2(0.5,0.5) , LastRadius*unScaledTexCoords[nPointsOnCircles - 1]/2.0f + glm::vec2(0.5,0.5) , LastRadius*unScaledTexCoords[0]/2.0f + glm::vec2(0.5,0.5) );
+        EnteringSlide.pushTriangle(Radius*unScaledTexCoords[nPointsOnCircles - 1]/2.0f + glm::vec2(0.5,0.5) , LastRadius*unScaledTexCoords[0]/2.0f + glm::vec2(0.5,0.5) , Radius*unScaledTexCoords[0]/2.0f + glm::vec2(0.5,0.5) );
 
-        LeavingSlide.pushTriangle(Radius*unScaledTexCoords[nPointsOnCircles - 1]/2.0 + basegfx::B2DVector(0.5,0.5) , LastRadius*unScaledTexCoords[nPointsOnCircles - 1]/2.0 + basegfx::B2DVector(0.5,0.5) , LastRadius*unScaledTexCoords[0]/2.0 + basegfx::B2DVector(0.5,0.5) );
-        LeavingSlide.pushTriangle(Radius*unScaledTexCoords[nPointsOnCircles - 1]/2.0 + basegfx::B2DVector(0.5,0.5) , LastRadius*unScaledTexCoords[0]/2.0 + basegfx::B2DVector(0.5,0.5) , Radius*unScaledTexCoords[0]/2.0 + basegfx::B2DVector(0.5,0.5) );
+        LeavingSlide.pushTriangle(Radius*unScaledTexCoords[nPointsOnCircles - 1]/2.0f + glm::vec2(0.5,0.5) , LastRadius*unScaledTexCoords[nPointsOnCircles - 1]/2.0f + glm::vec2(0.5,0.5) , LastRadius*unScaledTexCoords[0]/2.0f + glm::vec2(0.5,0.5) );
+        LeavingSlide.pushTriangle(Radius*unScaledTexCoords[nPointsOnCircles - 1]/2.0f + glm::vec2(0.5,0.5) , LastRadius*unScaledTexCoords[0]/2.0f + glm::vec2(0.5,0.5) , Radius*unScaledTexCoords[0]/2.0f + glm::vec2(0.5,0.5) );
 
-        basegfx::B3DVector axis(randNormVectorInXYPlane());
-        EnteringSlide.Operations.push_back( makeSRotate( axis , basegfx::B3DVector(0,0,0) , 180, true, Radius/2.0 , (NextRadius + 1)/2.0 ) );
-        LeavingSlide.Operations.push_back( makeSRotate( axis , basegfx::B3DVector(0,0,0) , 180, true, Radius/2.0 , (NextRadius + 1)/2.0 ) );
-        EnteringSlide.Operations.push_back( makeSRotate( axis , basegfx::B3DVector(0,0,0) , -180, false,0.0,1.0) );
+        glm::vec3 axis(randNormVectorInXYPlane());
+        EnteringSlide.Operations.push_back( makeSRotate( axis , glm::vec3(0,0,0) , 180, true, Radius/2.0 , (NextRadius + 1)/2.0 ) );
+        LeavingSlide.Operations.push_back( makeSRotate( axis , glm::vec3(0,0,0) , 180, true, Radius/2.0 , (NextRadius + 1)/2.0 ) );
+        EnteringSlide.Operations.push_back( makeSRotate( axis , glm::vec3(0,0,0) , -180, false,0.0,1.0) );
 
         aEnteringSlide.push_back(EnteringSlide);
         aLeavingSlide.push_back(LeavingSlide);
@@ -781,23 +780,23 @@ boost::shared_ptr<OGLTransitionImpl> makeRevolvingCircles( ::sal_uInt16 nCircles
         for(int Side(0); Side < nPointsOnCircles - 1; ++Side)
         {
 
-            EnteringSlide.pushTriangle(clamp(Radius*unScaledTexCoords[Side])/2.0 + basegfx::B2DVector(0.5,0.5) , LastRadius*unScaledTexCoords[Side]/2.0 + basegfx::B2DVector(0.5,0.5) , LastRadius*unScaledTexCoords[Side + 1]/2.0 + basegfx::B2DVector(0.5,0.5) );
-            EnteringSlide.pushTriangle(clamp(Radius*unScaledTexCoords[Side])/2.0 + basegfx::B2DVector(0.5,0.5) , LastRadius*unScaledTexCoords[Side + 1]/2.0 + basegfx::B2DVector(0.5,0.5) , clamp(Radius*unScaledTexCoords[Side + 1])/2.0 + basegfx::B2DVector(0.5,0.5) );
+            EnteringSlide.pushTriangle(clamp(Radius*unScaledTexCoords[Side])/2.0f + glm::vec2(0.5,0.5) , LastRadius*unScaledTexCoords[Side]/2.0f + glm::vec2(0.5,0.5) , LastRadius*unScaledTexCoords[Side + 1]/2.0f + glm::vec2(0.5,0.5) );
+            EnteringSlide.pushTriangle(clamp(Radius*unScaledTexCoords[Side])/2.0f + glm::vec2(0.5,0.5) , LastRadius*unScaledTexCoords[Side + 1]/2.0f + glm::vec2(0.5,0.5) , clamp(Radius*unScaledTexCoords[Side + 1])/2.0f + glm::vec2(0.5,0.5) );
 
-            LeavingSlide.pushTriangle(clamp(Radius*unScaledTexCoords[Side])/2.0 + basegfx::B2DVector(0.5,0.5) , LastRadius*unScaledTexCoords[Side]/2.0 + basegfx::B2DVector(0.5,0.5) , LastRadius*unScaledTexCoords[Side + 1]/2.0 + basegfx::B2DVector(0.5,0.5) );
-            LeavingSlide.pushTriangle(clamp(Radius*unScaledTexCoords[Side])/2.0 + basegfx::B2DVector(0.5,0.5) , LastRadius*unScaledTexCoords[Side + 1]/2.0 + basegfx::B2DVector(0.5,0.5) , clamp(Radius*unScaledTexCoords[Side + 1])/2.0 + basegfx::B2DVector(0.5,0.5) );
+            LeavingSlide.pushTriangle(clamp(Radius*unScaledTexCoords[Side])/2.0f + glm::vec2(0.5,0.5) , LastRadius*unScaledTexCoords[Side]/2.0f + glm::vec2(0.5,0.5) , LastRadius*unScaledTexCoords[Side + 1]/2.0f + glm::vec2(0.5,0.5) );
+            LeavingSlide.pushTriangle(clamp(Radius*unScaledTexCoords[Side])/2.0f + glm::vec2(0.5,0.5) , LastRadius*unScaledTexCoords[Side + 1]/2.0f + glm::vec2(0.5,0.5) , clamp(Radius*unScaledTexCoords[Side + 1])/2.0f + glm::vec2(0.5,0.5) );
         }
 
-        EnteringSlide.pushTriangle(clamp(Radius*unScaledTexCoords[nPointsOnCircles - 1])/2.0 + basegfx::B2DVector(0.5,0.5) , LastRadius*unScaledTexCoords[nPointsOnCircles - 1]/2.0 + basegfx::B2DVector(0.5,0.5) , LastRadius*unScaledTexCoords[0]/2.0 + basegfx::B2DVector(0.5,0.5) );
-        EnteringSlide.pushTriangle(clamp(Radius*unScaledTexCoords[nPointsOnCircles - 1])/2.0 + basegfx::B2DVector(0.5,0.5) , LastRadius*unScaledTexCoords[0]/2.0 + basegfx::B2DVector(0.5,0.5) , clamp(Radius*unScaledTexCoords[0])/2.0 + basegfx::B2DVector(0.5,0.5) );
+        EnteringSlide.pushTriangle(clamp(Radius*unScaledTexCoords[nPointsOnCircles - 1])/2.0f + glm::vec2(0.5,0.5) , LastRadius*unScaledTexCoords[nPointsOnCircles - 1]/2.0f + glm::vec2(0.5,0.5) , LastRadius*unScaledTexCoords[0]/2.0f + glm::vec2(0.5,0.5) );
+        EnteringSlide.pushTriangle(clamp(Radius*unScaledTexCoords[nPointsOnCircles - 1])/2.0f + glm::vec2(0.5,0.5) , LastRadius*unScaledTexCoords[0]/2.0f + glm::vec2(0.5,0.5) , clamp(Radius*unScaledTexCoords[0])/2.0f + glm::vec2(0.5,0.5) );
 
-        LeavingSlide.pushTriangle(clamp(Radius*unScaledTexCoords[nPointsOnCircles - 1])/2.0 + basegfx::B2DVector(0.5,0.5) , LastRadius*unScaledTexCoords[nPointsOnCircles - 1]/2.0 + basegfx::B2DVector(0.5,0.5) , LastRadius*unScaledTexCoords[0]/2.0 + basegfx::B2DVector(0.5,0.5) );
-        LeavingSlide.pushTriangle(clamp(Radius*unScaledTexCoords[nPointsOnCircles - 1])/2.0 + basegfx::B2DVector(0.5,0.5) , LastRadius*unScaledTexCoords[0]/2.0 + basegfx::B2DVector(0.5,0.5) , clamp(Radius*unScaledTexCoords[0])/2.0 + basegfx::B2DVector(0.5,0.5) );
+        LeavingSlide.pushTriangle(clamp(Radius*unScaledTexCoords[nPointsOnCircles - 1])/2.0f + glm::vec2(0.5,0.5) , LastRadius*unScaledTexCoords[nPointsOnCircles - 1]/2.0f + glm::vec2(0.5,0.5) , LastRadius*unScaledTexCoords[0]/2.0f + glm::vec2(0.5,0.5) );
+        LeavingSlide.pushTriangle(clamp(Radius*unScaledTexCoords[nPointsOnCircles - 1])/2.0f + glm::vec2(0.5,0.5) , LastRadius*unScaledTexCoords[0]/2.0f + glm::vec2(0.5,0.5) , clamp(Radius*unScaledTexCoords[0])/2.0f + glm::vec2(0.5,0.5) );
 
-        basegfx::B3DVector axis(randNormVectorInXYPlane());
-        EnteringSlide.Operations.push_back( makeSRotate( axis , basegfx::B3DVector(0,0,0) , 180, true, (LastRadius + dRadius)/2.0 , 1.0 ) );
-        LeavingSlide.Operations.push_back( makeSRotate( axis , basegfx::B3DVector(0,0,0) , 180, true, (LastRadius + dRadius)/2.0 , 1.0 ) );
-        EnteringSlide.Operations.push_back( makeSRotate( axis , basegfx::B3DVector(0,0,0) , -180, false,0.0,1.0) );
+        glm::vec3 axis(randNormVectorInXYPlane());
+        EnteringSlide.Operations.push_back( makeSRotate( axis , glm::vec3(0,0,0) , 180, true, (LastRadius + dRadius)/2.0 , 1.0 ) );
+        LeavingSlide.Operations.push_back( makeSRotate( axis , glm::vec3(0,0,0) , 180, true, (LastRadius + dRadius)/2.0 , 1.0 ) );
+        EnteringSlide.Operations.push_back( makeSRotate( axis , glm::vec3(0,0,0) , -180, false,0.0,1.0) );
 
         aEnteringSlide.push_back(EnteringSlide);
         aLeavingSlide.push_back(LeavingSlide);
@@ -817,17 +816,17 @@ boost::shared_ptr<OGLTransitionImpl> makeHelix( ::sal_uInt16 nRows )
     {
         Primitive Tile;
 
-        Tile.pushTriangle(basegfx::B2DVector( 1.0 , iDn ) , basegfx::B2DVector( 0.0 , iDn ) , basegfx::B2DVector( 0.0 , iPDn ));
+        Tile.pushTriangle(glm::vec2( 1.0 , iDn ) , glm::vec2( 0.0 , iDn ) , glm::vec2( 0.0 , iPDn ));
 
-        Tile.pushTriangle(basegfx::B2DVector( 1.0 , iPDn ) , basegfx::B2DVector( 1.0 , iDn ) , basegfx::B2DVector( 0.0 , iPDn ));
+        Tile.pushTriangle(glm::vec2( 1.0 , iPDn ) , glm::vec2( 1.0 , iDn ) , glm::vec2( 0.0 , iPDn ));
 
-        Tile.Operations.push_back( makeSRotate( basegfx::B3DVector( 0 , 1 , 0 ) , ( Tile.getVertices()[1] + Tile.getVertices()[3] )/2.0 , 180 ,
+        Tile.Operations.push_back( makeSRotate( glm::vec3( 0 , 1 , 0 ) , ( Tile.getVertices()[1] + Tile.getVertices()[3] )/2.0f , 180 ,
                                                 true,min(max(static_cast<double>(i - nRows/2.0)*invN/2.0,0.0),1.0),
                                                 min(max(static_cast<double>(i + nRows/2.0)*invN/2.0,0.0),1.0) ) );
 
         aLeavingSlide.push_back(Tile);
 
-        Tile.Operations.push_back( makeSRotate( basegfx::B3DVector( 0 , 1 , 0 ) , ( Tile.getVertices()[1] + Tile.getVertices()[3] )/2.0 , -180 , false,0.0,1.0) );
+        Tile.Operations.push_back( makeSRotate( glm::vec3( 0 , 1 , 0 ) , ( Tile.getVertices()[1] + Tile.getVertices()[3] )/2.0f , -180 , false,0.0,1.0) );
 
         aEnteringSlide.push_back(Tile);
 
@@ -854,13 +853,13 @@ boost::shared_ptr<OGLTransitionImpl> makeNByMTileFlip( ::sal_uInt16 n, ::sal_uIn
         {
             Primitive Tile;
 
-            Tile.pushTriangle(basegfx::B2DVector( iPDn , jDm ) , basegfx::B2DVector( iDn , jDm ) , basegfx::B2DVector( iDn , jPDm ));
+            Tile.pushTriangle(glm::vec2( iPDn , jDm ) , glm::vec2( iDn , jDm ) , glm::vec2( iDn , jPDm ));
 
-            Tile.pushTriangle(basegfx::B2DVector( iPDn , jPDm ) , basegfx::B2DVector( iPDn , jDm ) , basegfx::B2DVector( iDn , jPDm ));//bottom left corner of tile
+            Tile.pushTriangle(glm::vec2( iPDn , jPDm ) , glm::vec2( iPDn , jDm ) , glm::vec2( iDn , jPDm ));//bottom left corner of tile
 
-            Tile.Operations.push_back( makeSRotate( basegfx::B3DVector( 1 , 1 , 0 ) , ( Tile.getVertices()[1] + Tile.getVertices()[3] )/2.0 , 180 , true, iDn*jDm/2.0 , ((iPDn*jPDm)+1.0)/2.0 ) );
+            Tile.Operations.push_back( makeSRotate( glm::vec3( 1 , 1 , 0 ) , ( Tile.getVertices()[1] + Tile.getVertices()[3] )/2.0f , 180 , true, iDn*jDm/2.0 , ((iPDn*jPDm)+1.0)/2.0 ) );
             aLeavingSlide.push_back(Tile);
-            Tile.Operations.push_back( makeSRotate( basegfx::B3DVector( 1 , 1 , 0 ) , ( Tile.getVertices()[1] + Tile.getVertices()[3] )/2.0 , -180, false, iDn*jDm/2.0 , ((iPDn*jPDm)+1.0)/2.0 ) );
+            Tile.Operations.push_back( makeSRotate( glm::vec3( 1 , 1 , 0 ) , ( Tile.getVertices()[1] + Tile.getVertices()[3] )/2.0f , -180, false, iDn*jDm/2.0 , ((iPDn*jPDm)+1.0)/2.0 ) );
 
             aEnteringSlide.push_back(Tile);
 
@@ -874,7 +873,7 @@ boost::shared_ptr<OGLTransitionImpl> makeNByMTileFlip( ::sal_uInt16 n, ::sal_uIn
     return makeSimpleTransition(aLeavingSlide, aEnteringSlide);
 }
 
-SRotate::SRotate(const basegfx::B3DVector& Axis, const basegfx::B3DVector& Origin,
+SRotate::SRotate(const glm::vec3& Axis, const glm::vec3& Origin,
         double Angle, bool bInter, double T0, double T1):
     Operation(bInter, T0, T1),
     axis(Axis),
@@ -883,7 +882,7 @@ SRotate::SRotate(const basegfx::B3DVector& Axis, const basegfx::B3DVector& Origi
 {
 }
 
-SScale::SScale(const basegfx::B3DVector& Scale, const basegfx::B3DVector& Origin,
+SScale::SScale(const glm::vec3& Scale, const glm::vec3& Origin,
         bool bInter, double T0, double T1):
     Operation(bInter, T0, T1),
     scale(Scale),
@@ -891,8 +890,8 @@ SScale::SScale(const basegfx::B3DVector& Scale, const basegfx::B3DVector& Origin
 {
 }
 
-RotateAndScaleDepthByWidth::RotateAndScaleDepthByWidth(const basegfx::B3DVector& Axis,
-        const basegfx::B3DVector& Origin, double Angle, bool bInter, double T0, double T1):
+RotateAndScaleDepthByWidth::RotateAndScaleDepthByWidth(const glm::vec3& Axis,
+        const glm::vec3& Origin, double Angle, bool bInter, double T0, double T1):
     Operation(bInter, T0, T1),
     axis(Axis),
     origin(Origin),
@@ -900,8 +899,8 @@ RotateAndScaleDepthByWidth::RotateAndScaleDepthByWidth(const basegfx::B3DVector&
 {
 }
 
-RotateAndScaleDepthByHeight::RotateAndScaleDepthByHeight(const basegfx::B3DVector& Axis,
-        const basegfx::B3DVector& Origin, double Angle, bool bInter, double T0, double T1):
+RotateAndScaleDepthByHeight::RotateAndScaleDepthByHeight(const glm::vec3& Axis,
+        const glm::vec3& Origin, double Angle, bool bInter, double T0, double T1):
     Operation(bInter, T0, T1),
     axis(Axis),
     origin(Origin),
@@ -910,26 +909,26 @@ RotateAndScaleDepthByHeight::RotateAndScaleDepthByHeight(const basegfx::B3DVecto
 }
 
 
-STranslate::STranslate(const basegfx::B3DVector& Vector, bool bInter, double T0, double T1):
+STranslate::STranslate(const glm::vec3& Vector, bool bInter, double T0, double T1):
     Operation(bInter, T0, T1),
     vector(Vector)
 {
 }
 
 boost::shared_ptr<SRotate>
-makeSRotate(const basegfx::B3DVector& Axis,const basegfx::B3DVector& Origin,double Angle,bool bInter, double T0, double T1)
+makeSRotate(const glm::vec3& Axis,const glm::vec3& Origin,double Angle,bool bInter, double T0, double T1)
 {
     return make_shared<SRotate>(Axis, Origin, Angle, bInter, T0, T1);
 }
 
 boost::shared_ptr<SScale>
-makeSScale(const basegfx::B3DVector& Scale, const basegfx::B3DVector& Origin,bool bInter, double T0, double T1)
+makeSScale(const glm::vec3& Scale, const glm::vec3& Origin,bool bInter, double T0, double T1)
 {
     return make_shared<SScale>(Scale, Origin, bInter, T0, T1);
 }
 
 boost::shared_ptr<STranslate>
-makeSTranslate(const basegfx::B3DVector& Vector,bool bInter, double T0, double T1)
+makeSTranslate(const glm::vec3& Vector,bool bInter, double T0, double T1)
 {
     return make_shared<STranslate>(Vector, bInter, T0, T1);
 }
@@ -941,13 +940,13 @@ makeSEllipseTranslate(double dWidth, double dHeight, double dStartPosition, doub
 }
 
 boost::shared_ptr<RotateAndScaleDepthByWidth>
-makeRotateAndScaleDepthByWidth(const basegfx::B3DVector& Axis,const basegfx::B3DVector& Origin,double Angle,bool bInter, double T0, double T1)
+makeRotateAndScaleDepthByWidth(const glm::vec3& Axis,const glm::vec3& Origin,double Angle,bool bInter, double T0, double T1)
 {
     return make_shared<RotateAndScaleDepthByWidth>(Axis, Origin, Angle, bInter, T0, T1);
 }
 
 boost::shared_ptr<RotateAndScaleDepthByHeight>
-makeRotateAndScaleDepthByHeight(const basegfx::B3DVector& Axis,const basegfx::B3DVector& Origin,double Angle,bool bInter, double T0, double T1)
+makeRotateAndScaleDepthByHeight(const glm::vec3& Axis,const glm::vec3& Origin,double Angle,bool bInter, double T0, double T1)
 {
     return make_shared<RotateAndScaleDepthByHeight>(Axis, Origin, Angle, bInter, T0, T1);
 }
@@ -965,7 +964,7 @@ void STranslate::interpolate(double t,double SlideWidthScale,double SlideHeightS
     if(!mbInterpolate || t > mnT1)
         t = mnT1;
     t = intervalInter(t,mnT0,mnT1);
-    glTranslated(SlideWidthScale*t*vector.getX(),SlideHeightScale*t*vector.getY(),t*vector.getZ());
+    glTranslated(SlideWidthScale*t*vector.x,SlideHeightScale*t*vector.y,t*vector.z);
     CHECK_GL_ERROR();
 }
 
@@ -977,11 +976,11 @@ void SRotate::interpolate(double t,double SlideWidthScale,double SlideHeightScal
     if(!mbInterpolate || t > mnT1)
         t = mnT1;
     t = intervalInter(t,mnT0,mnT1);
-    glTranslated(SlideWidthScale*origin.getX(),SlideHeightScale*origin.getY(),origin.getZ());
+    glTranslated(SlideWidthScale*origin.x,SlideHeightScale*origin.y,origin.z);
     glScaled(SlideWidthScale,SlideHeightScale,1);
-    glRotated(t*angle,axis.getX(),axis.getY(),axis.getZ());
+    glRotated(t*angle,axis.x,axis.y,axis.z);
     glScaled(1/SlideWidthScale,1/SlideHeightScale,1);
-    glTranslated(-SlideWidthScale*origin.getX(),-SlideHeightScale*origin.getY(),-origin.getZ());
+    glTranslated(-SlideWidthScale*origin.x,-SlideHeightScale*origin.y,-origin.z);
     CHECK_GL_ERROR();
 }
 
@@ -993,9 +992,9 @@ void SScale::interpolate(double t,double SlideWidthScale,double SlideHeightScale
     if(!mbInterpolate || t > mnT1)
         t = mnT1;
     t = intervalInter(t,mnT0,mnT1);
-    glTranslated(SlideWidthScale*origin.getX(),SlideHeightScale*origin.getY(),origin.getZ());
-    glScaled((1-t) + t*scale.getX(),(1-t) + t*scale.getY(),(1-t) + t*scale.getZ());
-    glTranslated(-SlideWidthScale*origin.getX(),-SlideHeightScale*origin.getY(),-origin.getZ());
+    glTranslated(SlideWidthScale*origin.x,SlideHeightScale*origin.y,origin.z);
+    glScaled((1-t) + t*scale.x,(1-t) + t*scale.y,(1-t) + t*scale.z);
+    glTranslated(-SlideWidthScale*origin.x,-SlideHeightScale*origin.y,-origin.z);
     CHECK_GL_ERROR();
 }
 
@@ -1007,9 +1006,9 @@ void RotateAndScaleDepthByWidth::interpolate(double t,double SlideWidthScale,dou
     if(!mbInterpolate || t > mnT1)
         t = mnT1;
     t = intervalInter(t,mnT0,mnT1);
-    glTranslated(SlideWidthScale*origin.getX(),SlideHeightScale*origin.getY(),SlideWidthScale*origin.getZ());
-    glRotated(t*angle,axis.getX(),axis.getY(),axis.getZ());
-    glTranslated(-SlideWidthScale*origin.getX(),-SlideHeightScale*origin.getY(),-SlideWidthScale*origin.getZ());
+    glTranslated(SlideWidthScale*origin.x,SlideHeightScale*origin.y,SlideWidthScale*origin.z);
+    glRotated(t*angle,axis.x,axis.y,axis.z);
+    glTranslated(-SlideWidthScale*origin.x,-SlideHeightScale*origin.y,-SlideWidthScale*origin.z);
     CHECK_GL_ERROR();
 }
 
@@ -1021,9 +1020,9 @@ void RotateAndScaleDepthByHeight::interpolate(double t,double SlideWidthScale,do
     if(!mbInterpolate || t > mnT1)
         t = mnT1;
     t = intervalInter(t,mnT0,mnT1);
-    glTranslated(SlideWidthScale*origin.getX(),SlideHeightScale*origin.getY(),SlideHeightScale*origin.getZ());
-    glRotated(t*angle,axis.getX(),axis.getY(),axis.getZ());
-    glTranslated(-SlideWidthScale*origin.getX(),-SlideHeightScale*origin.getY(),-SlideHeightScale*origin.getZ());
+    glTranslated(SlideWidthScale*origin.x,SlideHeightScale*origin.y,SlideHeightScale*origin.z);
+    glRotated(t*angle,axis.x,axis.y,axis.z);
+    glTranslated(-SlideWidthScale*origin.x,-SlideHeightScale*origin.y,-SlideHeightScale*origin.z);
     CHECK_GL_ERROR();
 }
 
@@ -1079,20 +1078,20 @@ void Primitive::swap(Primitive& rOther)
     swap(TexCoords, rOther.TexCoords);
 }
 
-void Primitive::pushTriangle(const basegfx::B2DVector& SlideLocation0,const basegfx::B2DVector& SlideLocation1,const basegfx::B2DVector& SlideLocation2)
+void Primitive::pushTriangle(const glm::vec2& SlideLocation0,const glm::vec2& SlideLocation1,const glm::vec2& SlideLocation2)
 {
-    vector<basegfx::B3DVector> Verts;
-    vector<basegfx::B2DVector> Texs;
+    vector<glm::vec3> Verts;
+    vector<glm::vec2> Texs;
     Verts.reserve(3);
     Texs.reserve(3);
 
-    Verts.push_back(basegfx::B3DVector( 2*SlideLocation0.getX() - 1, -2*SlideLocation0.getY() + 1 , 0.0 ));
-    Verts.push_back(basegfx::B3DVector( 2*SlideLocation1.getX() - 1, -2*SlideLocation1.getY() + 1 , 0.0 ));
-    Verts.push_back(basegfx::B3DVector( 2*SlideLocation2.getX() - 1, -2*SlideLocation2.getY() + 1 , 0.0 ));
+    Verts.push_back(glm::vec3( 2*SlideLocation0.x - 1, -2*SlideLocation0.y + 1 , 0.0 ));
+    Verts.push_back(glm::vec3( 2*SlideLocation1.x - 1, -2*SlideLocation1.y + 1 , 0.0 ));
+    Verts.push_back(glm::vec3( 2*SlideLocation2.x - 1, -2*SlideLocation2.y + 1 , 0.0 ));
 
     //figure out if they're facing the correct way, and make them face the correct way.
-    basegfx::B3DVector Normal( basegfx::cross( Verts[0] - Verts[1] , Verts[1] - Verts[2] ) );
-    if(Normal.getZ() >= 0.0)//if the normal is facing us
+    glm::vec3 Normal( glm::cross( Verts[0] - Verts[1] , Verts[1] - Verts[2] ) );
+    if(Normal.z >= 0.0)//if the normal is facing us
     {
         Texs.push_back(SlideLocation0);
         Texs.push_back(SlideLocation1);
@@ -1104,9 +1103,9 @@ void Primitive::pushTriangle(const basegfx::B2DVector& SlideLocation0,const base
         Texs.push_back(SlideLocation2);
         Texs.push_back(SlideLocation1);
         Verts.clear();
-        Verts.push_back(basegfx::B3DVector( 2*SlideLocation0.getX() - 1, -2*SlideLocation0.getY() + 1 , 0.0 ));
-        Verts.push_back(basegfx::B3DVector( 2*SlideLocation2.getX() - 1, -2*SlideLocation2.getY() + 1 , 0.0 ));
-        Verts.push_back(basegfx::B3DVector( 2*SlideLocation1.getX() - 1, -2*SlideLocation1.getY() + 1 , 0.0 ));
+        Verts.push_back(glm::vec3( 2*SlideLocation0.x - 1, -2*SlideLocation0.y + 1 , 0.0 ));
+        Verts.push_back(glm::vec3( 2*SlideLocation2.x - 1, -2*SlideLocation2.y + 1 , 0.0 ));
+        Verts.push_back(glm::vec3( 2*SlideLocation1.x - 1, -2*SlideLocation1.y + 1 , 0.0 ));
     }
 
     Vertices.push_back(Verts[0]);
@@ -1117,9 +1116,9 @@ void Primitive::pushTriangle(const basegfx::B2DVector& SlideLocation0,const base
     TexCoords.push_back(Texs[1]);
     TexCoords.push_back(Texs[2]);
 
-    Normals.push_back(basegfx::B3DVector(0,0,1));//all normals always face the screen when untransformed.
-    Normals.push_back(basegfx::B3DVector(0,0,1));//all normals always face the screen when untransformed.
-    Normals.push_back(basegfx::B3DVector(0,0,1));//all normals always face the screen when untransformed.
+    Normals.push_back(glm::vec3(0,0,1));//all normals always face the screen when untransformed.
+    Normals.push_back(glm::vec3(0,0,1));//all normals always face the screen when untransformed.
+    Normals.push_back(glm::vec3(0,0,1));//all normals always face the screen when untransformed.
 }
 
 namespace
@@ -1141,32 +1140,32 @@ void DiamondTransition::prepare_( double nTime, double /* SlideWidth */, double
 {
     Primitive Slide1, Slide2;
 
-    Slide1.pushTriangle (basegfx::B2DVector (0,0), basegfx::B2DVector (1,0), basegfx::B2DVector (0,1));
-    Slide1.pushTriangle (basegfx::B2DVector (1,0), basegfx::B2DVector (0,1), basegfx::B2DVector (1,1));
+    Slide1.pushTriangle (glm::vec2 (0,0), glm::vec2 (1,0), glm::vec2 (0,1));
+    Slide1.pushTriangle (glm::vec2 (1,0), glm::vec2 (0,1), glm::vec2 (1,1));
     Primitives_t aEnteringSlidePrimitives;
     aEnteringSlidePrimitives.push_back (Slide1);
 
     if( nTime >= 0.5 ) {
         double m = 1 - nTime;
 
-        Slide2.pushTriangle (basegfx::B2DVector (0,0), basegfx::B2DVector (m,0), basegfx::B2DVector (0,m));
-        Slide2.pushTriangle (basegfx::B2DVector (nTime,0), basegfx::B2DVector (1,0), basegfx::B2DVector (1,m));
-        Slide2.pushTriangle (basegfx::B2DVector (1,nTime), basegfx::B2DVector (1,1), basegfx::B2DVector (nTime,1));
-        Slide2.pushTriangle (basegfx::B2DVector (0,nTime), basegfx::B2DVector (m,1), basegfx::B2DVector (0,1));
+        Slide2.pushTriangle (glm::vec2 (0,0), glm::vec2 (m,0), glm::vec2 (0,m));
+        Slide2.pushTriangle (glm::vec2 (nTime,0), glm::vec2 (1,0), glm::vec2 (1,m));
+        Slide2.pushTriangle (glm::vec2 (1,nTime), glm::vec2 (1,1), glm::vec2 (nTime,1));
+        Slide2.pushTriangle (glm::vec2 (0,nTime), glm::vec2 (m,1), glm::vec2 (0,1));
     } else {
         double l = 0.5 - nTime;
         double h = 0.5 + nTime;
 
-        Slide2.pushTriangle (basegfx::B2DVector (0,0), basegfx::B2DVector (1,0), basegfx::B2DVector (0.5,l));
-        Slide2.pushTriangle (basegfx::B2DVector (0.5,l), basegfx::B2DVector (1,0), basegfx::B2DVector (h,0.5));
-        Slide2.pushTriangle (basegfx::B2DVector (1,0), basegfx::B2DVector (1,1), basegfx::B2DVector (h,0.5));
-        Slide2.pushTriangle (basegfx::B2DVector (h,0.5), basegfx::B2DVector (1,1), basegfx::B2DVector (0.5,h));
-        Slide2.pushTriangle (basegfx::B2DVector (0.5,h), basegfx::B2DVector (1,1), basegfx::B2DVector (0,1));
-        Slide2.pushTriangle (basegfx::B2DVector (l,0.5), basegfx::B2DVector (0.5,h), basegfx::B2DVector (0,1));
-        Slide2.pushTriangle (basegfx::B2DVector (0,0), basegfx::B2DVector (l,0.5), basegfx::B2DVector (0,1));
-        Slide2.pushTriangle (basegfx::B2DVector (0,0), basegfx::B2DVector (0.5,l), basegfx::B2DVector (l,0.5));
+        Slide2.pushTriangle (glm::vec2 (0,0), glm::vec2 (1,0), glm::vec2 (0.5,l));
+        Slide2.pushTriangle (glm::vec2 (0.5,l), glm::vec2 (1,0), glm::vec2 (h,0.5));
+        Slide2.pushTriangle (glm::vec2 (1,0), glm::vec2 (1,1), glm::vec2 (h,0.5));
+        Slide2.pushTriangle (glm::vec2 (h,0.5), glm::vec2 (1,1), glm::vec2 (0.5,h));
+        Slide2.pushTriangle (glm::vec2 (0.5,h), glm::vec2 (1,1), glm::vec2 (0,1));
+        Slide2.pushTriangle (glm::vec2 (l,0.5), glm::vec2 (0.5,h), glm::vec2 (0,1));
+        Slide2.pushTriangle (glm::vec2 (0,0), glm::vec2 (l,0.5), glm::vec2 (0,1));
+        Slide2.pushTriangle (glm::vec2 (0,0), glm::vec2 (0.5,l), glm::vec2 (l,0.5));
     }
-    Slide2.Operations.push_back (makeSTranslate (basegfx::B3DVector (0, 0, 0.00000001), false, -1, 0));
+    Slide2.Operations.push_back (makeSTranslate (glm::vec3 (0, 0, 0.00000001), false, -1, 0));
     Primitives_t aLeavingSlidePrimitives;
     aLeavingSlidePrimitives.push_back (Slide2);
 
@@ -1201,22 +1200,22 @@ boost::shared_ptr<OGLTransitionImpl> makeVenetianBlinds( bool vertical, int part
         Primitive Slide;
         n = (i + 1)/(double)parts;
         if( vertical ) {
-            Slide.pushTriangle (basegfx::B2DVector (ln,0), basegfx::B2DVector (n,0), basegfx::B2DVector (ln,1));
-            Slide.pushTriangle (basegfx::B2DVector (n,0), basegfx::B2DVector (ln,1), basegfx::B2DVector (n,1));
-            Slide.Operations.push_back(makeRotateAndScaleDepthByWidth(basegfx::B3DVector(0, 1, 0), basegfx::B3DVector(n + ln - 1, 0, -t30*p), -120, true, 0.0, 1.0));
+            Slide.pushTriangle (glm::vec2 (ln,0), glm::vec2 (n,0), glm::vec2 (ln,1));
+            Slide.pushTriangle (glm::vec2 (n,0), glm::vec2 (ln,1), glm::vec2 (n,1));
+            Slide.Operations.push_back(makeRotateAndScaleDepthByWidth(glm::vec3(0, 1, 0), glm::vec3(n + ln - 1, 0, -t30*p), -120, true, 0.0, 1.0));
         } else {
-            Slide.pushTriangle (basegfx::B2DVector (0,ln), basegfx::B2DVector (1,ln), basegfx::B2DVector (0,n));
-            Slide.pushTriangle (basegfx::B2DVector (1,ln), basegfx::B2DVector (0,n), basegfx::B2DVector (1,n));
-            Slide.Operations.push_back(makeRotateAndScaleDepthByHeight(basegfx::B3DVector(1, 0, 0), basegfx::B3DVector(0, 1 - n - ln, -t30*p), -120, true, 0.0, 1.0));
+            Slide.pushTriangle (glm::vec2 (0,ln), glm::vec2 (1,ln), glm::vec2 (0,n));
+            Slide.pushTriangle (glm::vec2 (1,ln), glm::vec2 (0,n), glm::vec2 (1,n));
+            Slide.Operations.push_back(makeRotateAndScaleDepthByHeight(glm::vec3(1, 0, 0), glm::vec3(0, 1 - n - ln, -t30*p), -120, true, 0.0, 1.0));
         }
         aLeavingSlide.push_back (Slide);
 
         if( vertical ) {
-            Slide.Operations.push_back(makeSRotate(basegfx::B3DVector(0, 1, 0), basegfx::B3DVector(2*n - 1, 0, 0), -60, false, -1, 0));
-            Slide.Operations.push_back(makeSRotate(basegfx::B3DVector(0, 1, 0), basegfx::B3DVector(n + ln - 1, 0, 0), 180, false, -1, 0));
+            Slide.Operations.push_back(makeSRotate(glm::vec3(0, 1, 0), glm::vec3(2*n - 1, 0, 0), -60, false, -1, 0));
+            Slide.Operations.push_back(makeSRotate(glm::vec3(0, 1, 0), glm::vec3(n + ln - 1, 0, 0), 180, false, -1, 0));
         } else {
-            Slide.Operations.push_back(makeSRotate(basegfx::B3DVector(1, 0, 0), basegfx::B3DVector(0, 1 - 2*n, 0), -60, false, -1, 0));
-            Slide.Operations.push_back(makeSRotate(basegfx::B3DVector(1, 0, 0), basegfx::B3DVector(0, 1 - n - ln, 0), 180, false, -1, 0));
+            Slide.Operations.push_back(makeSRotate(glm::vec3(1, 0, 0), glm::vec3(0, 1 - 2*n, 0), -60, false, -1, 0));
+            Slide.Operations.push_back(makeSRotate(glm::vec3(1, 0, 0), glm::vec3(0, 1 - n - ln, 0), 180, false, -1, 0));
         }
         aEnteringSlide.push_back (Slide);
         ln = n;
@@ -1293,8 +1292,8 @@ boost::shared_ptr<OGLTransitionImpl> makeFadeSmoothly()
 {
     Primitive Slide;
 
-    Slide.pushTriangle (basegfx::B2DVector (0,0), basegfx::B2DVector (1,0), basegfx::B2DVector (0,1));
-    Slide.pushTriangle (basegfx::B2DVector (1,0), basegfx::B2DVector (0,1), basegfx::B2DVector (1,1));
+    Slide.pushTriangle (glm::vec2 (0,0), glm::vec2 (1,0), glm::vec2 (0,1));
+    Slide.pushTriangle (glm::vec2 (1,0), glm::vec2 (0,1), glm::vec2 (1,1));
     Primitives_t aLeavingSlide;
     aLeavingSlide.push_back (Slide);
     Primitives_t aEnteringSlide;
@@ -1364,8 +1363,8 @@ boost::shared_ptr<OGLTransitionImpl> makeFadeThroughBlack()
 {
     Primitive Slide;
 
-    Slide.pushTriangle (basegfx::B2DVector (0,0), basegfx::B2DVector (1,0), basegfx::B2DVector (0,1));
-    Slide.pushTriangle (basegfx::B2DVector (1,0), basegfx::B2DVector (0,1), basegfx::B2DVector (1,1));
+    Slide.pushTriangle (glm::vec2 (0,0), glm::vec2 (1,0), glm::vec2 (0,1));
+    Slide.pushTriangle (glm::vec2 (1,0), glm::vec2 (0,1), glm::vec2 (1,1));
     Primitives_t aLeavingSlide;
     aLeavingSlide.push_back (Slide);
     Primitives_t aEnteringSlide;
@@ -1576,8 +1575,8 @@ boost::shared_ptr<OGLTransitionImpl> makeStatic()
 {
     Primitive Slide;
 
-    Slide.pushTriangle (basegfx::B2DVector (0,0), basegfx::B2DVector (1,0), basegfx::B2DVector (0,1));
-    Slide.pushTriangle (basegfx::B2DVector (1,0), basegfx::B2DVector (0,1), basegfx::B2DVector (1,1));
+    Slide.pushTriangle (glm::vec2 (0,0), glm::vec2 (1,0), glm::vec2 (0,1));
+    Slide.pushTriangle (glm::vec2 (1,0), glm::vec2 (0,1), glm::vec2 (1,1));
     Primitives_t aLeavingSlide;
     aLeavingSlide.push_back (Slide);
     Primitives_t aEnteringSlide;
@@ -1627,8 +1626,8 @@ boost::shared_ptr<OGLTransitionImpl> makeDissolve()
 {
     Primitive Slide;
 
-    Slide.pushTriangle (basegfx::B2DVector (0,0), basegfx::B2DVector (1,0), basegfx::B2DVector (0,1));
-    Slide.pushTriangle (basegfx::B2DVector (1,0), basegfx::B2DVector (0,1), basegfx::B2DVector (1,1));
+    Slide.pushTriangle (glm::vec2 (0,0), glm::vec2 (1,0), glm::vec2 (0,1));
+    Slide.pushTriangle (glm::vec2 (1,0), glm::vec2 (0,1), glm::vec2 (1,1));
     Primitives_t aLeavingSlide;
     aLeavingSlide.push_back (Slide);
     Primitives_t aEnteringSlide;
@@ -1645,25 +1644,25 @@ boost::shared_ptr<OGLTransitionImpl> makeNewsflash()
 {
     Primitive Slide;
 
-    Slide.pushTriangle(basegfx::B2DVector(0,0),basegfx::B2DVector(1,0),basegfx::B2DVector(0,1));
-    Slide.pushTriangle(basegfx::B2DVector(1,0),basegfx::B2DVector(0,1),basegfx::B2DVector(1,1));
-    Slide.Operations.push_back(makeSRotate(basegfx::B3DVector(0,0,1),basegfx::B3DVector(0,0,0),3000,true,0,0.5));
-    Slide.Operations.push_back(makeSScale(basegfx::B3DVector(0.01,0.01,0.01),basegfx::B3DVector(0,0,0),true,0,0.5));
-    Slide.Operations.push_back(makeSTranslate(basegfx::B3DVector(-10000, 0, 0),false, 0.5, 2));
+    Slide.pushTriangle(glm::vec2(0,0),glm::vec2(1,0),glm::vec2(0,1));
+    Slide.pushTriangle(glm::vec2(1,0),glm::vec2(0,1),glm::vec2(1,1));
+    Slide.Operations.push_back(makeSRotate(glm::vec3(0,0,1),glm::vec3(0,0,0),3000,true,0,0.5));
+    Slide.Operations.push_back(makeSScale(glm::vec3(0.01,0.01,0.01),glm::vec3(0,0,0),true,0,0.5));
+    Slide.Operations.push_back(makeSTranslate(glm::vec3(-10000, 0, 0),false, 0.5, 2));
     Primitives_t aLeavingSlide;
     aLeavingSlide.push_back(Slide);
 
     Slide.Operations.clear();
-    Slide.Operations.push_back(makeSRotate(basegfx::B3DVector(0,0,1),basegfx::B3DVector(0,0,0),-3000,true,0.5,1));
-    Slide.Operations.push_back(makeSTranslate(basegfx::B3DVector(-100, 0, 0),false, -1, 1));
-    Slide.Operations.push_back(makeSTranslate(basegfx::B3DVector(100, 0, 0),false, 0.5, 1));
-    Slide.Operations.push_back(makeSScale(basegfx::B3DVector(0.01,0.01,0.01),basegfx::B3DVector(0,0,0),false,-1,1));
-    Slide.Operations.push_back(makeSScale(basegfx::B3DVector(100,100,100),basegfx::B3DVector(0,0,0),true,0.5,1));
+    Slide.Operations.push_back(makeSRotate(glm::vec3(0,0,1),glm::vec3(0,0,0),-3000,true,0.5,1));
+    Slide.Operations.push_back(makeSTranslate(glm::vec3(-100, 0, 0),false, -1, 1));
+    Slide.Operations.push_back(makeSTranslate(glm::vec3(100, 0, 0),false, 0.5, 1));
+    Slide.Operations.push_back(makeSScale(glm::vec3(0.01,0.01,0.01),glm::vec3(0,0,0),false,-1,1));
+    Slide.Operations.push_back(makeSScale(glm::vec3(100,100,100),glm::vec3(0,0,0),true,0.5,1));
     Primitives_t aEnteringSlide;
     aEnteringSlide.push_back(Slide);
 
     Operations_t aOverallOperations;
-    aOverallOperations.push_back(makeSRotate(basegfx::B3DVector(0,0,1),basegfx::B3DVector(0.2,0.2,0),1080,true,0,1));
+    aOverallOperations.push_back(makeSRotate(glm::vec3(0,0,1),glm::vec3(0.2,0.2,0),1080,true,0,1));
 
     return makeSimpleTransition(aLeavingSlide, aEnteringSlide, aOverallOperations);
 }
diff --git a/slideshow/source/engine/OGLTrans/generic/OGLTrans_TransitionImpl.hxx b/slideshow/source/engine/OGLTrans/generic/OGLTrans_TransitionImpl.hxx
index 77bf3d6..460b3bf 100644
--- a/slideshow/source/engine/OGLTrans/generic/OGLTrans_TransitionImpl.hxx
+++ b/slideshow/source/engine/OGLTrans/generic/OGLTrans_TransitionImpl.hxx
@@ -29,6 +29,7 @@
 #define INCLUDED_OGLTRANS_TRANSITIONIMPL_HXX_
 
 #include <config_lgpl.h>
+#include <glm/glm.hpp>
 
 #include <boost/noncopyable.hpp>
 #include <boost/shared_ptr.hpp>
@@ -293,7 +294,7 @@ public:
     Location of third Vertex on slide
 
     */
-    void pushTriangle(const basegfx::B2DVector& SlideLocation0,const basegfx::B2DVector& SlideLocation1,const basegfx::B2DVector& SlideLocation2);
+    void pushTriangle(const glm::vec2& SlideLocation0,const glm::vec2& SlideLocation1,const glm::vec2& SlideLocation2);
 
     /** clear all the vertices, normals, tex coordinates, and normals
     */
@@ -304,11 +305,11 @@ public:
         @return
         the list of vertices
     */
-    const std::vector<basegfx::B3DVector>& getVertices() const {return Vertices;}
+    const std::vector<glm::vec3>& getVertices() const {return Vertices;}
 
     /** guards against directly changing the vertices
     */
-    const std::vector<basegfx::B3DVector>& getNormals() const {return Normals;}
+    const std::vector<glm::vec3>& getNormals() const {return Normals;}
 
     /** guards against directly changing the vertices
 
@@ -316,7 +317,7 @@ public:
         the list of Texture Coordinates
 
     */
-    const std::vector<basegfx::B2DVector>& getTexCoords() const {return TexCoords;}
+    const std::vector<glm::vec2>& getTexCoords() const {return TexCoords;}
 
     /** list of Operations to be performed on this primitive.These operations will be called in the order they were pushed back in. In OpenGL this effectively uses the operations in the opposite order they were pushed back.
 
@@ -329,15 +330,15 @@ public:
 private:
     /** list of vertices
     */
-    std::vector<basegfx::B3DVector> Vertices;
+    std::vector<glm::vec3> Vertices;
 
     /** list of Normals
     */
-    std::vector<basegfx::B3DVector> Normals;
+    std::vector<glm::vec3> Normals;
 
     /** list of Texture Coordinates
     */
-    std::vector<basegfx::B2DVector> TexCoords;
+    std::vector<glm::vec2> TexCoords;
 };
 
 /** This class is to be derived to make any operation (tranform) you may need in order to construct your transitions
@@ -407,16 +408,17 @@ public:
         transformation ending time
 
     */
-    SRotate(const basegfx::B3DVector& Axis,const basegfx::B3DVector& Origin,double Angle,bool bInter, double T0, double T1);
+    SRotate(const glm::vec3& Axis, const glm::vec3& Origin, double Angle,
+            bool bInter, double T0, double T1);
     virtual ~SRotate(){}
 private:
     /** axis to rotate CCW about
     */
-    basegfx::B3DVector axis;
+    glm::vec3 axis;
 
     /** position that rotation axis runs through
     */
-    basegfx::B3DVector origin;
+    glm::vec3 origin;
 
     /** angle in radians of CCW rotation
     */
@@ -424,7 +426,8 @@ private:
 };
 
 boost::shared_ptr<SRotate>
-makeSRotate(const basegfx::B3DVector& Axis,const basegfx::B3DVector& Origin,double Angle,bool bInter, double T0, double T1);
+makeSRotate(const glm::vec3& Axis, const glm::vec3& Origin, double Angle,
+        bool bInter, double T0, double T1);
 
 /** scaling transformation
 */
@@ -451,15 +454,15 @@ public:
         transformation ending time
 
     */
-    SScale(const basegfx::B3DVector& Scale, const basegfx::B3DVector& Origin,bool bInter, double T0, double T1);
+    SScale(const glm::vec3& Scale, const glm::vec3& Origin,bool bInter, double T0, double T1);
     virtual ~SScale(){}
 private:
-    basegfx::B3DVector scale;
-    basegfx::B3DVector origin;
+    glm::vec3 scale;
+    glm::vec3 origin;
 };
 
 boost::shared_ptr<SScale>
-makeSScale(const basegfx::B3DVector& Scale, const basegfx::B3DVector& Origin,bool bInter, double T0, double T1);
+makeSScale(const glm::vec3& Scale, const glm::vec3& Origin,bool bInter, double T0, double T1);
 
 /** translation transformation
 */
@@ -483,16 +486,16 @@ public:
         transformation ending time
 
     */
-    STranslate(const basegfx::B3DVector& Vector,bool bInter, double T0, double T1);
+    STranslate(const glm::vec3& Vector,bool bInter, double T0, double T1);
     virtual ~STranslate(){}
 private:
     /** vector to translate by
     */
-    basegfx::B3DVector vector;
+    glm::vec3 vector;
 };
 
 boost::shared_ptr<STranslate>
-makeSTranslate(const basegfx::B3DVector& Vector,bool bInter, double T0, double T1);
+makeSTranslate(const glm::vec3& Vector,bool bInter, double T0, double T1);
 
 /** translation transformation
 */
@@ -539,16 +542,16 @@ class RotateAndScaleDepthByWidth: public Operation
 public:
     virtual void interpolate(double t,double SlideWidthScale,double SlideHeightScale) const SAL_OVERRIDE;
 
-    RotateAndScaleDepthByWidth(const basegfx::B3DVector& Axis,const basegfx::B3DVector& Origin,double Angle,bool bInter, double T0, double T1);
+    RotateAndScaleDepthByWidth(const glm::vec3& Axis,const glm::vec3& Origin,double Angle,bool bInter, double T0, double T1);
     virtual ~RotateAndScaleDepthByWidth(){}
 private:
-    basegfx::B3DVector axis;
-    basegfx::B3DVector origin;
+    glm::vec3 axis;
+    glm::vec3 origin;
     double angle;
 };
 
 boost::shared_ptr<RotateAndScaleDepthByWidth>
-makeRotateAndScaleDepthByWidth(const basegfx::B3DVector& Axis,const basegfx::B3DVector& Origin,double Angle,bool bInter, double T0, double T1);
+makeRotateAndScaleDepthByWidth(const glm::vec3& Axis,const glm::vec3& Origin,double Angle,bool bInter, double T0, double T1);
 
 /** Same as SRotate, except the depth is scaled by the width of the slide divided by the height of the window.
 */
@@ -557,16 +560,16 @@ class RotateAndScaleDepthByHeight: public Operation
 public:
     virtual void interpolate(double t,double SlideWidthScale,double SlideHeightScale) const SAL_OVERRIDE;
 
-    RotateAndScaleDepthByHeight(const basegfx::B3DVector& Axis,const basegfx::B3DVector& Origin,double Angle,bool bInter, double T0, double T1);
+    RotateAndScaleDepthByHeight(const glm::vec3& Axis,const glm::vec3& Origin,double Angle,bool bInter, double T0, double T1);
     virtual ~RotateAndScaleDepthByHeight(){}
 private:
-    basegfx::B3DVector axis;
-    basegfx::B3DVector origin;
+    glm::vec3 axis;
+    glm::vec3 origin;
     double angle;
 };
 
 boost::shared_ptr<RotateAndScaleDepthByHeight>
-makeRotateAndScaleDepthByHeight(const basegfx::B3DVector& Axis,const basegfx::B3DVector& Origin,double Angle,bool bInter, double T0, double T1);
+makeRotateAndScaleDepthByHeight(const glm::vec3& Axis,const glm::vec3& Origin,double Angle,bool bInter, double T0, double T1);
 
 #endif // INCLUDED_SLIDESHOW_TRANSITION_HXX_
 
commit 454a42059f1a91bd5380f197c1b4e37db2049b04
Author: Markus Mohrhard <markus.mohrhard at googlemail.com>
Date:   Wed Aug 27 17:01:23 2014 +0200

    use constructor initializer list
    
    Change-Id: I0bb1345f05dbd835e3f7debc66a824ccf44ef88b

diff --git a/slideshow/source/engine/OGLTrans/generic/OGLTrans_TransitionImpl.cxx b/slideshow/source/engine/OGLTrans/generic/OGLTrans_TransitionImpl.cxx
index d05e38f..17bdff5 100644
--- a/slideshow/source/engine/OGLTrans/generic/OGLTrans_TransitionImpl.cxx
+++ b/slideshow/source/engine/OGLTrans/generic/OGLTrans_TransitionImpl.cxx
@@ -876,54 +876,44 @@ boost::shared_ptr<OGLTransitionImpl> makeNByMTileFlip( ::sal_uInt16 n, ::sal_uIn
 
 SRotate::SRotate(const basegfx::B3DVector& Axis, const basegfx::B3DVector& Origin,
         double Angle, bool bInter, double T0, double T1):
+    Operation(bInter, T0, T1),
     axis(Axis),
     origin(Origin),
     angle(Angle)
 {
-    nT0 = T0;
-    nT1 = T1;
-    bInterpolate = bInter;
 }
 
 SScale::SScale(const basegfx::B3DVector& Scale, const basegfx::B3DVector& Origin,
         bool bInter, double T0, double T1):
+    Operation(bInter, T0, T1),
     scale(Scale),
     origin(Origin)
 {
-    nT0 = T0;
-    nT1 = T1;
-    bInterpolate = bInter;
 }
 
 RotateAndScaleDepthByWidth::RotateAndScaleDepthByWidth(const basegfx::B3DVector& Axis,
         const basegfx::B3DVector& Origin, double Angle, bool bInter, double T0, double T1):
+    Operation(bInter, T0, T1),
     axis(Axis),
     origin(Origin),
     angle(Angle)
 {
-    nT0 = T0;
-    nT1 = T1;
-    bInterpolate = bInter;
 }
 
 RotateAndScaleDepthByHeight::RotateAndScaleDepthByHeight(const basegfx::B3DVector& Axis,
         const basegfx::B3DVector& Origin, double Angle, bool bInter, double T0, double T1):
+    Operation(bInter, T0, T1),
     axis(Axis),
     origin(Origin),
     angle(Angle)
 {
-    nT0 = T0;
-    nT1 = T1;
-    bInterpolate = bInter;
 }
 
 
 STranslate::STranslate(const basegfx::B3DVector& Vector, bool bInter, double T0, double T1):
+    Operation(bInter, T0, T1),
     vector(Vector)
 {
-    nT0 = T0;
-    nT1 = T1;
-    bInterpolate = bInter;
 }
 
 boost::shared_ptr<SRotate>
@@ -970,11 +960,11 @@ inline double intervalInter(double t, double T0, double T1)
 void STranslate::interpolate(double t,double SlideWidthScale,double SlideHeightScale) const
 {
     CHECK_GL_ERROR();
-    if(t <= nT0)
+    if(t <= mnT0)
         return;
-    if(!bInterpolate || t > nT1)
-        t = nT1;
-    t = intervalInter(t,nT0,nT1);
+    if(!mbInterpolate || t > mnT1)
+        t = mnT1;
+    t = intervalInter(t,mnT0,mnT1);
     glTranslated(SlideWidthScale*t*vector.getX(),SlideHeightScale*t*vector.getY(),t*vector.getZ());
     CHECK_GL_ERROR();
 }
@@ -982,11 +972,11 @@ void STranslate::interpolate(double t,double SlideWidthScale,double SlideHeightS
 void SRotate::interpolate(double t,double SlideWidthScale,double SlideHeightScale) const
 {
     CHECK_GL_ERROR();
-    if(t <= nT0)
+    if(t <= mnT0)
         return;
-    if(!bInterpolate || t > nT1)
-        t = nT1;
-    t = intervalInter(t,nT0,nT1);
+    if(!mbInterpolate || t > mnT1)
+        t = mnT1;
+    t = intervalInter(t,mnT0,mnT1);
     glTranslated(SlideWidthScale*origin.getX(),SlideHeightScale*origin.getY(),origin.getZ());
     glScaled(SlideWidthScale,SlideHeightScale,1);
     glRotated(t*angle,axis.getX(),axis.getY(),axis.getZ());
@@ -998,11 +988,11 @@ void SRotate::interpolate(double t,double SlideWidthScale,double SlideHeightScal
 void SScale::interpolate(double t,double SlideWidthScale,double SlideHeightScale) const
 {
     CHECK_GL_ERROR();
-    if(t <= nT0)
+    if(t <= mnT0)
         return;
-    if(!bInterpolate || t > nT1)
-        t = nT1;
-    t = intervalInter(t,nT0,nT1);
+    if(!mbInterpolate || t > mnT1)
+        t = mnT1;
+    t = intervalInter(t,mnT0,mnT1);
     glTranslated(SlideWidthScale*origin.getX(),SlideHeightScale*origin.getY(),origin.getZ());
     glScaled((1-t) + t*scale.getX(),(1-t) + t*scale.getY(),(1-t) + t*scale.getZ());
     glTranslated(-SlideWidthScale*origin.getX(),-SlideHeightScale*origin.getY(),-origin.getZ());
@@ -1012,11 +1002,11 @@ void SScale::interpolate(double t,double SlideWidthScale,double SlideHeightScale
 void RotateAndScaleDepthByWidth::interpolate(double t,double SlideWidthScale,double SlideHeightScale) const
 {
     CHECK_GL_ERROR();
-    if(t <= nT0)
+    if(t <= mnT0)
         return;
-    if(!bInterpolate || t > nT1)
-        t = nT1;
-    t = intervalInter(t,nT0,nT1);
+    if(!mbInterpolate || t > mnT1)
+        t = mnT1;
+    t = intervalInter(t,mnT0,mnT1);
     glTranslated(SlideWidthScale*origin.getX(),SlideHeightScale*origin.getY(),SlideWidthScale*origin.getZ());
     glRotated(t*angle,axis.getX(),axis.getY(),axis.getZ());
     glTranslated(-SlideWidthScale*origin.getX(),-SlideHeightScale*origin.getY(),-SlideWidthScale*origin.getZ());
@@ -1026,11 +1016,11 @@ void RotateAndScaleDepthByWidth::interpolate(double t,double SlideWidthScale,dou
 void RotateAndScaleDepthByHeight::interpolate(double t,double SlideWidthScale,double SlideHeightScale) const
 {
     CHECK_GL_ERROR();
-    if(t <= nT0)
+    if(t <= mnT0)
         return;
-    if(!bInterpolate || t > nT1)
-        t = nT1;
-    t = intervalInter(t,nT0,nT1);
+    if(!mbInterpolate || t > mnT1)
+        t = mnT1;
+    t = intervalInter(t,mnT0,mnT1);
     glTranslated(SlideWidthScale*origin.getX(),SlideHeightScale*origin.getY(),SlideHeightScale*origin.getZ());
     glRotated(t*angle,axis.getX(),axis.getY(),axis.getZ());
     glTranslated(-SlideWidthScale*origin.getX(),-SlideHeightScale*origin.getY(),-SlideHeightScale*origin.getZ());
@@ -1038,11 +1028,9 @@ void RotateAndScaleDepthByHeight::interpolate(double t,double SlideWidthScale,do
 }
 
 SEllipseTranslate::SEllipseTranslate(double dWidth, double dHeight, double dStartPosition,
-        double dEndPosition, bool bInter, double T0, double T1)
+        double dEndPosition, bool bInter, double T0, double T1):
+    Operation(bInter, T0, T1)
 {
-    nT0 = T0;
-    nT1 = T1;
-    bInterpolate = bInter;
     width = dWidth;
     height = dHeight;
     startPosition = dStartPosition;
@@ -1051,11 +1039,11 @@ SEllipseTranslate::SEllipseTranslate(double dWidth, double dHeight, double dStar
 
 void SEllipseTranslate::interpolate(double t,double /* SlideWidthScale */,double /* SlideHeightScale */) const
 {
-    if(t <= nT0)
+    if(t <= mnT0)
         return;
-    if(!bInterpolate || t > nT1)
-        t = nT1;
-    t = intervalInter(t,nT0,nT1);
+    if(!mbInterpolate || t > mnT1)
+        t = mnT1;
+    t = intervalInter(t,mnT0,mnT1);
 
     double a1, a2, x, y;
     a1 = startPosition*2*M_PI;
diff --git a/slideshow/source/engine/OGLTrans/generic/OGLTrans_TransitionImpl.hxx b/slideshow/source/engine/OGLTrans/generic/OGLTrans_TransitionImpl.hxx
index 0e8de1c..77bf3d6 100644
--- a/slideshow/source/engine/OGLTrans/generic/OGLTrans_TransitionImpl.hxx
+++ b/slideshow/source/engine/OGLTrans/generic/OGLTrans_TransitionImpl.hxx
@@ -348,17 +348,17 @@ public:
     virtual ~Operation(){}
 
 protected:
-    /** Should this operation be interpolated . If TRUE, the transform will smoothly move from making no difference from t = 0.0 to nT0 to being completely transformed from t = nT1 to 1. If FALSE, the transform will be inneffectual from t = 0 to nT0, and completely transformed from t = nT0 to 1.
+    /** Should this operation be interpolated . If TRUE, the transform will smoothly move from making no difference from t = 0.0 to mnT0 to being completely transformed from t = mnT1 to 1. If FALSE, the transform will be inneffectual from t = 0 to mnT0, and completely transformed from t = mnT0 to 1.
     */
-    bool bInterpolate;
+    bool mbInterpolate;
 
     /** time to begin the transformation
     */
-    double nT0;
+    double mnT0;
 
     /** time to finish the transformation
     */
-    double nT1;
+    double mnT1;
 public:
     /** this is the function that is called to give the Operation to OpenGL.
 
@@ -375,8 +375,8 @@ public:
     virtual void interpolate(double t,double SlideWidthScale,double SlideHeightScale) const = 0;
 
 protected:
-    Operation():
-        bInterpolate(false), nT0(0.0), nT1(0.0){}
+    Operation(bool bInterpolate, double nT0, double nT1):
+        mbInterpolate(bInterpolate), mnT0(nT0), mnT1(nT1){}
 };
 
 /** this class is a generic CounterClockWise(CCW) rotation with an axis angle
commit ee4a4875ec0cfbcf4982a73b62884a292ccf62cd
Author: Markus Mohrhard <markus.mohrhard at googlemail.com>
Date:   Wed Aug 27 16:54:29 2014 +0200

    improve readability
    
    Change-Id: I7a8791c661cbd3c602c0d12d228b63ffc416a96c

diff --git a/slideshow/source/engine/OGLTrans/generic/OGLTrans_TransitionImpl.cxx b/slideshow/source/engine/OGLTrans/generic/OGLTrans_TransitionImpl.cxx
index efa3ec9..d05e38f 100644
--- a/slideshow/source/engine/OGLTrans/generic/OGLTrans_TransitionImpl.cxx
+++ b/slideshow/source/engine/OGLTrans/generic/OGLTrans_TransitionImpl.cxx
@@ -874,28 +874,43 @@ boost::shared_ptr<OGLTransitionImpl> makeNByMTileFlip( ::sal_uInt16 n, ::sal_uIn
     return makeSimpleTransition(aLeavingSlide, aEnteringSlide);
 }
 
-SRotate::SRotate(const basegfx::B3DVector& Axis,const basegfx::B3DVector& Origin,double Angle, bool bInter, double T0, double T1):axis(Axis),origin(Origin),angle(Angle)
+SRotate::SRotate(const basegfx::B3DVector& Axis, const basegfx::B3DVector& Origin,
+        double Angle, bool bInter, double T0, double T1):
+    axis(Axis),
+    origin(Origin),
+    angle(Angle)
 {
     nT0 = T0;
     nT1 = T1;
     bInterpolate = bInter;
 }
 
-SScale::SScale(const basegfx::B3DVector& Scale,const basegfx::B3DVector& Origin, bool bInter, double T0, double T1):scale(Scale),origin(Origin)
+SScale::SScale(const basegfx::B3DVector& Scale, const basegfx::B3DVector& Origin,
+        bool bInter, double T0, double T1):
+    scale(Scale),
+    origin(Origin)
 {
     nT0 = T0;
     nT1 = T1;
     bInterpolate = bInter;
 }
 
-RotateAndScaleDepthByWidth::RotateAndScaleDepthByWidth(const basegfx::B3DVector& Axis,const basegfx::B3DVector& Origin,double Angle, bool bInter, double T0, double T1):axis(Axis),origin(Origin),angle(Angle)
+RotateAndScaleDepthByWidth::RotateAndScaleDepthByWidth(const basegfx::B3DVector& Axis,
+        const basegfx::B3DVector& Origin, double Angle, bool bInter, double T0, double T1):
+    axis(Axis),
+    origin(Origin),
+    angle(Angle)
 {
     nT0 = T0;
     nT1 = T1;
     bInterpolate = bInter;
 }
 
-RotateAndScaleDepthByHeight::RotateAndScaleDepthByHeight(const basegfx::B3DVector& Axis,const basegfx::B3DVector& Origin,double Angle, bool bInter, double T0, double T1):axis(Axis),origin(Origin),angle(Angle)
+RotateAndScaleDepthByHeight::RotateAndScaleDepthByHeight(const basegfx::B3DVector& Axis,
+        const basegfx::B3DVector& Origin, double Angle, bool bInter, double T0, double T1):
+    axis(Axis),
+    origin(Origin),
+    angle(Angle)
 {
     nT0 = T0;
     nT1 = T1;
@@ -903,7 +918,8 @@ RotateAndScaleDepthByHeight::RotateAndScaleDepthByHeight(const basegfx::B3DVecto
 }
 
 
-STranslate::STranslate(const basegfx::B3DVector& Vector, bool bInter, double T0, double T1):vector(Vector)
+STranslate::STranslate(const basegfx::B3DVector& Vector, bool bInter, double T0, double T1):
+    vector(Vector)
 {
     nT0 = T0;
     nT1 = T1;
@@ -1021,7 +1037,8 @@ void RotateAndScaleDepthByHeight::interpolate(double t,double SlideWidthScale,do
     CHECK_GL_ERROR();
 }
 
-SEllipseTranslate::SEllipseTranslate(double dWidth, double dHeight, double dStartPosition, double dEndPosition, bool bInter, double T0, double T1)
+SEllipseTranslate::SEllipseTranslate(double dWidth, double dHeight, double dStartPosition,
+        double dEndPosition, bool bInter, double T0, double T1)
 {
     nT0 = T0;
     nT1 = T1;
commit dc0ff03e84fbd546b082c4c63ff0e4820e5ba5df
Author: Markus Mohrhard <markus.mohrhard at googlemail.com>
Date:   Wed Aug 27 16:51:07 2014 +0200

    no need to make these variables public
    
    Change-Id: I9b57d6811252c75186e03ed6928bd8829fa0307c

diff --git a/slideshow/source/engine/OGLTrans/generic/OGLTrans_TransitionImpl.hxx b/slideshow/source/engine/OGLTrans/generic/OGLTrans_TransitionImpl.hxx
index f66eebb..0e8de1c 100644
--- a/slideshow/source/engine/OGLTrans/generic/OGLTrans_TransitionImpl.hxx
+++ b/slideshow/source/engine/OGLTrans/generic/OGLTrans_TransitionImpl.hxx
@@ -347,6 +347,7 @@ class Operation : private boost::noncopyable
 public:
     virtual ~Operation(){}
 
+protected:
     /** Should this operation be interpolated . If TRUE, the transform will smoothly move from making no difference from t = 0.0 to nT0 to being completely transformed from t = nT1 to 1. If FALSE, the transform will be inneffectual from t = 0 to nT0, and completely transformed from t = nT0 to 1.
     */
     bool bInterpolate;
@@ -374,7 +375,8 @@ public:
     virtual void interpolate(double t,double SlideWidthScale,double SlideHeightScale) const = 0;
 
 protected:
-    Operation():bInterpolate(false), nT0(0.0), nT1(0.0){}
+    Operation():
+        bInterpolate(false), nT0(0.0), nT1(0.0){}
 };
 
 /** this class is a generic CounterClockWise(CCW) rotation with an axis angle
commit e7100306c572e6ba2182a675365ce8d44603fe91
Author: Markus Mohrhard <markus.mohrhard at googlemail.com>
Date:   Wed Aug 27 16:46:30 2014 +0200

    more OpenGL error checking in OGLTrans
    
    Change-Id: I7eff84d18be92423b3d8616162bfaf5be5203a9d

diff --git a/slideshow/source/engine/OGLTrans/generic/OGLTrans_TransitionImpl.cxx b/slideshow/source/engine/OGLTrans/generic/OGLTrans_TransitionImpl.cxx
index 6af1027..efa3ec9 100644
--- a/slideshow/source/engine/OGLTrans/generic/OGLTrans_TransitionImpl.cxx
+++ b/slideshow/source/engine/OGLTrans/generic/OGLTrans_TransitionImpl.cxx
@@ -172,11 +172,16 @@ void OGLTransitionImpl::display( double nTime, ::sal_Int32 glLeavingSlideTex, ::
     const double SlideWidthScale = SlideWidth/DispWidth;
     const double SlideHeightScale = SlideHeight/DispHeight;
 
+    CHECK_GL_ERROR();
     prepare_( nTime, SlideWidth, SlideHeight, DispWidth, DispHeight );
 
+    CHECK_GL_ERROR();
     glPushMatrix();
+    CHECK_GL_ERROR();
     displaySlides_( nTime, glLeavingSlideTex, glEnteringSlideTex, SlideWidthScale, SlideHeightScale );
+    CHECK_GL_ERROR();
     displayScene( nTime, SlideWidth, SlideHeight, DispWidth, DispHeight );
+    CHECK_GL_ERROR();
     glPopMatrix();
     CHECK_GL_ERROR();
 }
@@ -195,8 +200,9 @@ OGLTransitionImpl::displaySlide(
         double SlideWidthScale, double SlideHeightScale )
 {
     CHECK_GL_ERROR();
-   //TODO change to foreach
+    //TODO change to foreach
     glBindTexture(GL_TEXTURE_2D, glSlideTex);
+    CHECK_GL_ERROR();
 
     // display slide reflection
     // note that depth test is turned off while blending the shadow
@@ -240,18 +246,29 @@ void Primitive::display(double nTime, double WidthScale, double HeightScale) con
     CHECK_GL_ERROR();
     glPushMatrix();
 
+    CHECK_GL_ERROR();
     applyOperations( nTime, WidthScale, HeightScale );
 
+    CHECK_GL_ERROR();
     glEnableClientState( GL_VERTEX_ARRAY );
+    CHECK_GL_ERROR();
     if(!Normals.empty())
     {
+        CHECK_GL_ERROR();
         glNormalPointer( GL_DOUBLE , 0 , &Normals[0] );
+        CHECK_GL_ERROR();
         glEnableClientState( GL_NORMAL_ARRAY );
+        CHECK_GL_ERROR();
     }
+    CHECK_GL_ERROR();
     glEnableClientState( GL_TEXTURE_COORD_ARRAY );
+    CHECK_GL_ERROR();
     glTexCoordPointer( 2, GL_DOUBLE, 0, &TexCoords[0] );
+    CHECK_GL_ERROR();
     glVertexPointer( 3, GL_DOUBLE, 0, &Vertices[0] );
+    CHECK_GL_ERROR();
     glDrawArrays( GL_TRIANGLES, 0, Vertices.size() );
+    CHECK_GL_ERROR();
     glPopMatrix();
     CHECK_GL_ERROR();
 }

... etc. - the rest is truncated


More information about the Libreoffice-commits mailing list