From 536c2e0ec916eb49c534b4937b36da278dbe2364 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Foucault?= Date: Mon, 17 Aug 2020 18:08:47 +0200 Subject: GPUState: Only apply state before drawing --- source/blender/gpu/intern/gpu_batch.cc | 2 ++ 1 file changed, 2 insertions(+) (limited to 'source/blender/gpu/intern/gpu_batch.cc') 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()); -- cgit v1.2.3