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_immediate.cc
parent482a51aabf596ca1f279ab3b7cb3170c867b4a42 (diff)
GPUState: Only apply state before drawing
Diffstat (limited to 'source/blender/gpu/intern/gpu_immediate.cc')
-rw-r--r--source/blender/gpu/intern/gpu_immediate.cc2
1 files changed, 2 insertions, 0 deletions
diff --git a/source/blender/gpu/intern/gpu_immediate.cc b/source/blender/gpu/intern/gpu_immediate.cc
index ed2950d8ee9..dd05689d69a 100644
--- a/source/blender/gpu/intern/gpu_immediate.cc
+++ b/source/blender/gpu/intern/gpu_immediate.cc
@@ -210,6 +210,8 @@ static bool vertex_count_makes_sense_for_primitive(uint vertex_len, GPUPrimType
void immBegin(GPUPrimType prim_type, uint vertex_len)
{
+ GPU_context_active_get()->state_manager->apply_state();
+
#if TRUST_NO_ONE
assert(initialized);
assert(imm.prim_type == GPU_PRIM_NONE); /* make sure we haven't already begun */