diff options
author | Emmanuel Gil Peyrot <emmanuel.peyrot@collabora.com> | 2016-02-24 20:21:09 +0000 |
---|---|---|
committer | jan iversen <jani@documentfoundation.org> | 2016-03-15 16:09:06 +0000 |
commit | 04d1ff651baac7ce0f851786064736ab7141b6f9 (patch) | |
tree | fab1369263f7f0f2d9465719191471e9ae90606c | |
parent | c0c41a27dde5779af9d2737e6871d82015aa6395 (diff) |
slideshow: Move Vortex’ tileInfo attribute upload to the first frame
(cherry-picked from the commit 9adeebadd5d1728e9abaec67aa4dd8a0c300c98f)
Change-Id: Ifbc154755d43a085b78740a5a3c97ed2cbe9a905
Reviewed-on: https://gerrit.libreoffice.org/22774
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: jan iversen <jani@documentfoundation.org>
-rw-r--r-- | slideshow/source/engine/OGLTrans/generic/OGLTrans_TransitionImpl.cxx | 18 |
1 files changed, 4 insertions, 14 deletions
diff --git a/slideshow/source/engine/OGLTrans/generic/OGLTrans_TransitionImpl.cxx b/slideshow/source/engine/OGLTrans/generic/OGLTrans_TransitionImpl.cxx index 39a68bc0424f..a70c6c55e696 100644 --- a/slideshow/source/engine/OGLTrans/generic/OGLTrans_TransitionImpl.cxx +++ b/slideshow/source/engine/OGLTrans/generic/OGLTrans_TransitionImpl.cxx @@ -1557,7 +1557,6 @@ public: } private: - virtual void prepare( double nTime, double SlideWidth, double SlideHeight, double DispWidth, double DispHeight ) override; virtual void finishTransition() override; virtual GLuint makeShader() const override; virtual void prepareTransition( sal_Int32 glLeavingSlideTex, sal_Int32 glEnteringSlideTex ) override; @@ -1575,19 +1574,6 @@ private: std::vector<GLfloat> mvTileInfo; }; -void VortexTransition::prepare( double, double, double, double, double ) -{ - glBindBuffer(GL_ARRAY_BUFFER, mnTileInfoBuffer); - CHECK_GL_ERROR(); - glEnableVertexAttribArray(mnTileInfoLocation); - CHECK_GL_ERROR(); - glVertexAttribPointer(mnTileInfoLocation, 1, GL_FLOAT, GL_FALSE, 0, nullptr); - CHECK_GL_ERROR(); - - glBindBuffer(GL_ARRAY_BUFFER, 0); - CHECK_GL_ERROR(); -} - void VortexTransition::finishTransition() { PermTextureTransition::finishTransition(); @@ -1669,6 +1655,10 @@ void VortexTransition::prepareTransition( sal_Int32 glLeavingSlideTex, sal_Int32 glBindBuffer(GL_ARRAY_BUFFER, mnTileInfoBuffer); CHECK_GL_ERROR(); + glEnableVertexAttribArray(mnTileInfoLocation); + CHECK_GL_ERROR(); + glVertexAttribPointer(mnTileInfoLocation, 1, GL_FLOAT, GL_FALSE, 0, nullptr); + CHECK_GL_ERROR(); glBufferData(GL_ARRAY_BUFFER, mvTileInfo.size()*sizeof(GLfloat), mvTileInfo.data(), GL_STATIC_DRAW); CHECK_GL_ERROR(); |