diff options
author | Clément Foucault <foucault.clem@gmail.com> | 2020-08-10 02:40:23 +0300 |
---|---|---|
committer | Clément Foucault <foucault.clem@gmail.com> | 2020-08-13 15:20:23 +0300 |
commit | 157f2a20e6bd539604a0d5ff48a4b7741eb1952b (patch) | |
tree | 21d65f92d9cd6484940666ea37435fbcc566949f /source/blender/gpu/intern/gpu_element.cc | |
parent | 00a3c297d254ee7acb375206d7ed0cf6f0ef9ef9 (diff) |
GPU: Use GPU_vertbuf_create & GPU_indexbuf_calloc instead of manual alloc
Diffstat (limited to 'source/blender/gpu/intern/gpu_element.cc')
-rw-r--r-- | source/blender/gpu/intern/gpu_element.cc | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/source/blender/gpu/intern/gpu_element.cc b/source/blender/gpu/intern/gpu_element.cc index cf7cc1d214c..29c95c725fd 100644 --- a/source/blender/gpu/intern/gpu_element.cc +++ b/source/blender/gpu/intern/gpu_element.cc @@ -326,6 +326,11 @@ static void squeeze_indices_short(GPUIndexBufBuilder *builder, #endif /* GPU_TRACK_INDEX_RANGE */ +GPUIndexBuf *GPU_indexbuf_calloc(void) +{ + return (GPUIndexBuf *)MEM_callocN(sizeof(GPUIndexBuf), __func__); +} + GPUIndexBuf *GPU_indexbuf_build(GPUIndexBufBuilder *builder) { GPUIndexBuf *elem = (GPUIndexBuf *)MEM_callocN(sizeof(GPUIndexBuf), "GPUIndexBuf"); |