[Libreoffice-commits] core.git: Branch 'feature/mac-opengl-fixes' - 2 commits - slideshow/source

Markus Mohrhard markus.mohrhard at googlemail.com
Wed Aug 27 15:27:36 PDT 2014


 slideshow/source/engine/OGLTrans/generic/OGLTrans_TransitionImpl.cxx |   42 +++++-----
 slideshow/source/engine/OGLTrans/generic/OGLTrans_TransitionImpl.hxx |    6 -
 2 files changed, 24 insertions(+), 24 deletions(-)

New commits:
commit 5008262f26482870cea3f838ee6e1558e2918ae5
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 fb91b2734dc2a14a72b97a70bf09f53d641315f1
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.
       *


More information about the Libreoffice-commits mailing list