From f349ea5508b1f8c756b4193baf759402150cf3a5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Foucault?= Date: Thu, 13 Aug 2020 02:29:09 +0200 Subject: GPUDrawList: Fix gl error with drawing without the correct VAO bound --- source/blender/gpu/opengl/gl_batch.hh | 2 -- source/blender/gpu/opengl/gl_drawlist.cc | 2 ++ 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'source/blender') diff --git a/source/blender/gpu/opengl/gl_batch.hh b/source/blender/gpu/opengl/gl_batch.hh index 490c9180a99..d70f43aed2a 100644 --- a/source/blender/gpu/opengl/gl_batch.hh +++ b/source/blender/gpu/opengl/gl_batch.hh @@ -96,8 +96,6 @@ class GLBatch : public Batch { ~GLBatch(); void draw(int v_first, int v_count, int i_first, int i_count) override; - - private: void bind(int i_first); MEM_CXX_CLASS_ALLOC_FUNCS("GLBatch"); diff --git a/source/blender/gpu/opengl/gl_drawlist.cc b/source/blender/gpu/opengl/gl_drawlist.cc index e801a28ec52..618263e8f2b 100644 --- a/source/blender/gpu/opengl/gl_drawlist.cc +++ b/source/blender/gpu/opengl/gl_drawlist.cc @@ -202,6 +202,8 @@ void GLDrawList::submit(void) data_ = NULL; /* Unmapped */ data_offset_ += command_offset_; + static_cast(batch_)->bind(0); + if (MDI_INDEXED) { glMultiDrawElementsIndirect(prim, INDEX_TYPE(batch_->elem), offset, command_len_, 0); } -- cgit v1.2.3