Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/source
diff options
context:
space:
mode:
authorClément Foucault <foucault.clem@gmail.com>2020-09-10 16:53:48 +0300
committerClément Foucault <foucault.clem@gmail.com>2020-09-10 16:55:14 +0300
commit405a5d3bd7ada5dd5af605b59ba07c7144f144a2 (patch)
tree289455cb6f5c0262edad3159b7df53e57554a017 /source
parent48a99fab2b425a30cfc8a44b64ab3a440e08f518 (diff)
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.
Diffstat (limited to 'source')
-rw-r--r--source/blender/gpu/intern/gpu_batch.cc3
1 files changed, 0 insertions, 3 deletions
diff --git a/source/blender/gpu/intern/gpu_batch.cc b/source/blender/gpu/intern/gpu_batch.cc
index de079a89de7..1f873570f4a 100644
--- a/source/blender/gpu/intern/gpu_batch.cc
+++ b/source/blender/gpu/intern/gpu_batch.cc
@@ -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(