Kaydet (Commit) ba02afad authored tarafından Emmanuel Gil Peyrot's avatar Emmanuel Gil Peyrot Kaydeden (comit) Tor Lillqvist

slideshow: Don’t create the permTexture if the shaders don’t use it

Change-Id: I0aefe2130a85303213e247676d45546d9859cf62
üst f41358a7
......@@ -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();
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment