File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -200,14 +200,15 @@ -(void)transitionRenderer:(CCRenderer *)renderer FromState:(CCRenderState *)prev
200
200
}
201
201
202
202
// Bind the shader.
203
- if (previous == nil || _shader != previous->_shader ){
203
+ BOOL bindShader = (previous == nil || _shader != previous->_shader );
204
+ if (bindShader){
204
205
CCGL_DEBUG_INSERT_EVENT_MARKER (" Shader" );
205
206
206
207
glUseProgram (_shader->_program );
207
208
}
208
209
209
210
// Set the shader's uniform state.
210
- if (previous == nil || _shaderUniforms != previous->_shaderUniforms ){
211
+ if (bindShader || _shaderUniforms != previous->_shaderUniforms ){
211
212
CCGL_DEBUG_INSERT_EVENT_MARKER (" Uniforms" );
212
213
213
214
NSDictionary *globalShaderUniforms = renderer->_globalShaderUniforms ;
You can’t perform that action at this time.
0 commit comments