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/draw/intern/draw_manager_exec.c | |
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/draw/intern/draw_manager_exec.c')
-rw-r--r-- | source/blender/draw/intern/draw_manager_exec.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/source/blender/draw/intern/draw_manager_exec.c b/source/blender/draw/intern/draw_manager_exec.c index 1d15548e1ed..58464c0a15a 100644 --- a/source/blender/draw/intern/draw_manager_exec.c +++ b/source/blender/draw/intern/draw_manager_exec.c @@ -646,9 +646,10 @@ BLI_INLINE void draw_select_buffer(DRWShadingGroup *shgroup, const bool is_instancing = (batch->inst[0] != NULL); int start = 0; int count = 1; - int tot = is_instancing ? batch->inst[0]->vertex_len : batch->verts[0]->vertex_len; + int tot = is_instancing ? GPU_vertbuf_get_vertex_len(batch->inst[0]) : + GPU_vertbuf_get_vertex_len(batch->verts[0]); /* Hack : get "vbo" data without actually drawing. */ - int *select_id = (void *)state->select_buf->data; + int *select_id = (void *)GPU_vertbuf_get_data(state->select_buf); /* Batching */ if (!is_instancing) { |