GPUBatch: Do not unbind shader after drawing.

This allows subsequent redraw to work just like before.
However a better safeguard system against setting the uniforms in the
wrong shader would be nice to have.
This commit is contained in:
Clément Foucault 2020-09-10 15:53:48 +02:00
parent 48a99fab2b
commit 405a5d3bd7
Notes: blender-bot 2023-02-13 21:14:38 +01:00
Referenced by commit b7f3ebe014, Fix T86450: Random dark UI elements when redrawing
Referenced by issue #86450, Random User Interface Colour Change (2.91+ Regression?)
Referenced by issue #80538, Knife Tool Glitches
1 changed files with 0 additions and 3 deletions

View File

@ -235,14 +235,12 @@ void GPU_batch_draw(GPUBatch *batch)
{
GPU_shader_bind(batch->shader);
GPU_batch_draw_advanced(batch, 0, 0, 0, 0);
GPU_shader_unbind();
}
void GPU_batch_draw_range(GPUBatch *batch, int v_first, int v_count)
{
GPU_shader_bind(batch->shader);
GPU_batch_draw_advanced(batch, v_first, v_count, 0, 0);
GPU_shader_unbind();
}
/* Draw multiple instance of a batch without having any instance attributes. */
@ -252,7 +250,6 @@ void GPU_batch_draw_instanced(GPUBatch *batch, int i_count)
GPU_shader_bind(batch->shader);
GPU_batch_draw_advanced(batch, 0, 0, 0, i_count);
GPU_shader_unbind();
}
void GPU_batch_draw_advanced(