summaryrefslogtreecommitdiff
path: root/slideshow/source
diff options
context:
space:
mode:
authorEmmanuel Gil Peyrot <emmanuel.peyrot@collabora.com>2015-12-21 21:25:33 +0000
committerTomaž Vajngerl <tomaz.vajngerl@collabora.com>2016-01-05 15:05:48 +0100
commit1d411cad5a7d78ead8cffb5da522f1e0fba31187 (patch)
treec0f3134cef987e1e8940ea9db45266f651f683d5 /slideshow/source
parent22480b20130d10f4691cdf0a658040be7f36e47b (diff)
slideshow: Improve the Ripple transition to match PowerPoint better
Change-Id: I0b8a78fc6bce5cb737cc7070b1b69184c5f6991c
Diffstat (limited to 'slideshow/source')
-rw-r--r--slideshow/source/engine/OGLTrans/generic/OGLTrans_TransitionImpl.cxx11
1 files changed, 11 insertions, 0 deletions
diff --git a/slideshow/source/engine/OGLTrans/generic/OGLTrans_TransitionImpl.cxx b/slideshow/source/engine/OGLTrans/generic/OGLTrans_TransitionImpl.cxx
index 7effc6887bfe..cafc8aeb2bfd 100644
--- a/slideshow/source/engine/OGLTrans/generic/OGLTrans_TransitionImpl.cxx
+++ b/slideshow/source/engine/OGLTrans/generic/OGLTrans_TransitionImpl.cxx
@@ -1696,8 +1696,10 @@ public:
private:
virtual GLuint makeShader() const override;
virtual void prepareTransition( sal_Int32 glLeavingSlideTex, sal_Int32 glEnteringSlideTex ) override;
+ virtual void prepare( double nTime, double SlideWidth, double SlideHeight, double DispWidth, double DispHeight ) override;
glm::vec2 maCenter;
+ GLint maSlideRatioLocation = -1;
};
GLuint RippleTransition::makeShader() const
@@ -1712,6 +1714,15 @@ void RippleTransition::prepareTransition( sal_Int32, sal_Int32 )
glUniform2fv(nCenterLocation, 1, glm::value_ptr(maCenter));
CHECK_GL_ERROR();
+
+ maSlideRatioLocation = glGetUniformLocation(m_nProgramObject, "slideRatio");
+ CHECK_GL_ERROR();
+}
+
+void RippleTransition::prepare( double /* nTime */, double SlideWidth, double SlideHeight, double /* DispWidth */, double /* DispHeight */ )
+{
+ if( maSlideRatioLocation != -1 )
+ glUniform1f( maSlideRatioLocation, SlideWidth / SlideHeight );
}
std::shared_ptr<OGLTransitionImpl>