From 7ffff04e4900ca284519900d12bd1490e218c4f4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Foucault?= Date: Sun, 6 Sep 2020 16:40:07 +0200 Subject: 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. --- source/blender/draw/intern/draw_manager_exec.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'source/blender/draw/intern/draw_manager_exec.c') 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) { -- cgit v1.2.3