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
diff options
context:
space:
mode:
authorClément Foucault <foucault.clem@gmail.com>2020-08-17 19:08:47 +0300
committerClément Foucault <foucault.clem@gmail.com>2020-08-18 22:30:10 +0300
commit536c2e0ec916eb49c534b4937b36da278dbe2364 (patch)
tree87f955824a41094dfd9e4e015c776b86832ea22e /source/blender/gpu/intern/gpu_batch.cc
parent482a51aabf596ca1f279ab3b7cb3170c867b4a42 (diff)
GPUState: Only apply state before drawing
Diffstat (limited to 'source/blender/gpu/intern/gpu_batch.cc')
-rw-r--r--source/blender/gpu/intern/gpu_batch.cc2
1 files changed, 2 insertions, 0 deletions
diff --git a/source/blender/gpu/intern/gpu_batch.cc b/source/blender/gpu/intern/gpu_batch.cc
index 6ea82cbc4f1..36f60c3dcc8 100644
--- a/source/blender/gpu/intern/gpu_batch.cc
+++ b/source/blender/gpu/intern/gpu_batch.cc
@@ -282,6 +282,8 @@ void GPU_batch_draw_advanced(GPUBatch *batch, int v_first, int v_count, int i_fi
/* just draw some vertices and let shader place them where we want. */
void GPU_draw_primitive(GPUPrimType prim_type, int v_count)
{
+ GPU_context_active_get()->state_manager->apply_state();
+
/* we cannot draw without vao ... annoying ... */
glBindVertexArray(GPU_vao_default());