diff options
author | Emmanuel Gil Peyrot <emmanuel.peyrot@collabora.com> | 2016-02-24 20:21:09 +0000 |
---|---|---|
committer | Tomaž Vajngerl <quikee@gmail.com> | 2016-02-25 11:11:17 +0000 |
commit | 9adeebadd5d1728e9abaec67aa4dd8a0c300c98f (patch) | |
tree | d76b0a3f405d864fc4614bedcb6809aed7207184 /slideshow | |
parent | 92f013c38ac71969674e08aa453c01c030b3dbf7 (diff) |
slideshow: Move Vortex’ tileInfo attribute upload to the first frame
Change-Id: Ifbc154755d43a085b78740a5a3c97ed2cbe9a905
Reviewed-on: https://gerrit.libreoffice.org/22467
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Tomaž Vajngerl <quikee@gmail.com>
Diffstat (limited to 'slideshow')
-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 86e1131efeb4..672903bc6ad7 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(); |