summaryrefslogtreecommitdiff
path: root/slideshow
diff options
context:
space:
mode:
authorEmmanuel Gil Peyrot <emmanuel.peyrot@collabora.com>2015-11-19 17:18:52 +0000
committerTor Lillqvist <tml@collabora.com>2015-11-19 19:21:38 +0200
commitba02afad40570cf45b1f4af3287333e7c060a3fd (patch)
tree88db8f2d12ca8d6f2718f7e0c1c572a0e6b4ac09 /slideshow
parentf41358a71f4a6641141d90c33cdd763f9c4d3395 (diff)
slideshow: Don’t create the permTexture if the shaders don’t use it
Change-Id: I0aefe2130a85303213e247676d45546d9859cf62
Diffstat (limited to 'slideshow')
-rw-r--r--slideshow/source/engine/OGLTrans/generic/OGLTrans_TransitionImpl.cxx16
1 files changed, 8 insertions, 8 deletions
diff --git a/slideshow/source/engine/OGLTrans/generic/OGLTrans_TransitionImpl.cxx b/slideshow/source/engine/OGLTrans/generic/OGLTrans_TransitionImpl.cxx
index 529034fce81c..54033dfbe795 100644
--- a/slideshow/source/engine/OGLTrans/generic/OGLTrans_TransitionImpl.cxx
+++ b/slideshow/source/engine/OGLTrans/generic/OGLTrans_TransitionImpl.cxx
@@ -1525,16 +1525,16 @@ void ShaderTransition::impl_preparePermShader()
CHECK_GL_ERROR();
}
- glActiveTexture(GL_TEXTURE1);
- CHECK_GL_ERROR();
- if( !m_nHelperTexture )
- initPermTexture( &m_nHelperTexture );
-
- glActiveTexture(GL_TEXTURE0);
- CHECK_GL_ERROR();
-
location = glGetUniformLocation( m_nProgramObject, "permTexture" );
if( location != -1 ) {
+ glActiveTexture(GL_TEXTURE1);
+ CHECK_GL_ERROR();
+ if( !m_nHelperTexture )
+ initPermTexture( &m_nHelperTexture );
+
+ glActiveTexture(GL_TEXTURE0);
+ CHECK_GL_ERROR();
+
glUniform1i( location, 1 ); // texture unit 1
CHECK_GL_ERROR();
}