diff options
author | Clément Foucault <foucault.clem@gmail.com> | 2020-08-13 03:29:09 +0300 |
---|---|---|
committer | Clément Foucault <foucault.clem@gmail.com> | 2020-08-13 15:20:24 +0300 |
commit | f349ea5508b1f8c756b4193baf759402150cf3a5 (patch) | |
tree | 61ebd0fdbca7410c16ed9dcd59a0d0dfcf9ea224 /source/blender/gpu | |
parent | 985070b1cec5e13902e792374686976f9576bf3b (diff) |
GPUDrawList: Fix gl error with drawing without the correct VAO bound
Diffstat (limited to 'source/blender/gpu')
-rw-r--r-- | source/blender/gpu/opengl/gl_batch.hh | 2 | ||||
-rw-r--r-- | source/blender/gpu/opengl/gl_drawlist.cc | 2 |
2 files changed, 2 insertions, 2 deletions
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<GLBatch *>(batch_)->bind(0); + if (MDI_INDEXED) { glMultiDrawElementsIndirect(prim, INDEX_TYPE(batch_->elem), offset, command_len_, 0); } |