diff options
author | Clément Foucault <foucault.clem@gmail.com> | 2020-09-06 17:40:07 +0300 |
---|---|---|
committer | Clément Foucault <foucault.clem@gmail.com> | 2020-09-06 23:13:06 +0300 |
commit | 7ffff04e4900ca284519900d12bd1490e218c4f4 (patch) | |
tree | d148ee3c5c286a45bc33f521c2c606e47dd43968 /source/blender/gpu/intern/gpu_batch.cc | |
parent | 98fc3f263cf18a1222d7ffe7dc0e1c0a1fa47ecd (diff) |
GPUVertBuf: Make GPUVertBuf private to the GPU module
This is just a cleanup to isolate the internals of the vertbuf.
This adds some getters to avoid refactor of existing code.
Diffstat (limited to 'source/blender/gpu/intern/gpu_batch.cc')
-rw-r--r-- | source/blender/gpu/intern/gpu_batch.cc | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/source/blender/gpu/intern/gpu_batch.cc b/source/blender/gpu/intern/gpu_batch.cc index 75419e1a242..864843a6d01 100644 --- a/source/blender/gpu/intern/gpu_batch.cc +++ b/source/blender/gpu/intern/gpu_batch.cc @@ -36,11 +36,12 @@ #include "GPU_shader.h" #include "gpu_backend.hh" -#include "gpu_batch_private.hh" #include "gpu_context_private.hh" #include "gpu_index_buffer_private.hh" #include "gpu_shader_private.hh" -#include "gpu_vertex_format_private.h" +#include "gpu_vertex_buffer_private.hh" + +#include "gpu_batch_private.hh" #include <string.h> @@ -198,7 +199,8 @@ int GPU_batch_vertbuf_add_ex(GPUBatch *batch, GPUVertBuf *verts, bool own_vbo) if (batch->verts[v] == NULL) { /* for now all VertexBuffers must have same vertex_len */ if (batch->verts[0] != NULL) { - BLI_assert(verts->vertex_len == batch->verts[0]->vertex_len); + /* This is an issue for the HACK inside DRW_vbo_request(). */ + // BLI_assert(verts->vertex_len == batch->verts[0]->vertex_len); } batch->verts[v] = verts; SET_FLAG_FROM_TEST(batch->flag, own_vbo, (eGPUBatchFlag)(GPU_BATCH_OWNS_VBO << v)); |