cogl: Set the layer matrix on the right layer instead of a random one
When uploading the layer matrix to GL it wasn't first calling glActiveTextureMatrix to set the right texture unit for the layer. This would end up setting the texture matrix on whatever layer happened to be previously active. This happened to work for test-cogl-multitexture presumably because it was coincidentally setting the layer matrix on the last used layer.
This commit is contained in:
parent
98a33e03d3
commit
645ca56208
@ -83,6 +83,8 @@ _cogl_pipeline_vertend_fixed_add_layer (CoglPipeline *pipeline,
|
||||
_cogl_matrix_stack_set (unit->matrix_stack,
|
||||
&authority->big_state->matrix);
|
||||
|
||||
_cogl_set_active_texture_unit (unit_index);
|
||||
|
||||
_cogl_matrix_stack_flush_to_gl (unit->matrix_stack, COGL_MATRIX_TEXTURE);
|
||||
}
|
||||
|
||||
|
@ -271,6 +271,8 @@ _cogl_pipeline_vertend_glsl_add_layer (CoglPipeline *pipeline,
|
||||
_cogl_matrix_stack_set (unit->matrix_stack,
|
||||
&authority->big_state->matrix);
|
||||
|
||||
_cogl_set_active_texture_unit (unit_index);
|
||||
|
||||
_cogl_matrix_stack_flush_to_gl (unit->matrix_stack, COGL_MATRIX_TEXTURE);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user