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_data.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_data.c')
-rw-r--r-- | source/blender/draw/intern/draw_manager_data.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/source/blender/draw/intern/draw_manager_data.c b/source/blender/draw/intern/draw_manager_data.c index 09448f8783b..d92b2fb00d4 100644 --- a/source/blender/draw/intern/draw_manager_data.c +++ b/source/blender/draw/intern/draw_manager_data.c @@ -1115,7 +1115,7 @@ DRWCallBuffer *DRW_shgroup_call_buffer_instance(DRWShadingGroup *shgroup, void DRW_buffer_add_entry_struct(DRWCallBuffer *callbuf, const void *data) { GPUVertBuf *buf = callbuf->buf; - const bool resize = (callbuf->count == buf->vertex_alloc); + const bool resize = (callbuf->count == GPU_vertbuf_get_vertex_alloc(buf)); if (UNLIKELY(resize)) { GPU_vertbuf_data_resize(buf, callbuf->count + DRW_BUFFER_VERTS_CHUNK); @@ -1136,9 +1136,9 @@ void DRW_buffer_add_entry_struct(DRWCallBuffer *callbuf, const void *data) void DRW_buffer_add_entry_array(DRWCallBuffer *callbuf, const void *attr[], uint attr_len) { GPUVertBuf *buf = callbuf->buf; - const bool resize = (callbuf->count == buf->vertex_alloc); + const bool resize = (callbuf->count == GPU_vertbuf_get_vertex_alloc(buf)); - BLI_assert(attr_len == buf->format.attr_len); + BLI_assert(attr_len == GPU_vertbuf_get_format(buf)->attr_len); UNUSED_VARS_NDEBUG(attr_len); if (UNLIKELY(resize)) { |