From 157f2a20e6bd539604a0d5ff48a4b7741eb1952b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Foucault?= Date: Mon, 10 Aug 2020 01:40:23 +0200 Subject: GPU: Use GPU_vertbuf_create & GPU_indexbuf_calloc instead of manual alloc --- source/blender/draw/intern/draw_cache_inline.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'source/blender/draw/intern/draw_cache_inline.h') diff --git a/source/blender/draw/intern/draw_cache_inline.h b/source/blender/draw/intern/draw_cache_inline.h index 06d6f1afc31..415fe2479ab 100644 --- a/source/blender/draw/intern/draw_cache_inline.h +++ b/source/blender/draw/intern/draw_cache_inline.h @@ -69,7 +69,7 @@ BLI_INLINE bool DRW_batch_requested(GPUBatch *batch, int prim_type) BLI_INLINE void DRW_ibo_request(GPUBatch *batch, GPUIndexBuf **ibo) { if (*ibo == NULL) { - *ibo = MEM_callocN(sizeof(GPUIndexBuf), "GPUIndexBuf"); + *ibo = GPU_indexbuf_calloc(); } if (batch != NULL) { GPU_batch_vao_cache_clear(batch); @@ -87,7 +87,7 @@ BLI_INLINE bool DRW_ibo_requested(GPUIndexBuf *ibo) BLI_INLINE void DRW_vbo_request(GPUBatch *batch, GPUVertBuf **vbo) { if (*vbo == NULL) { - *vbo = MEM_callocN(sizeof(GPUVertBuf), "GPUVertBuf"); + *vbo = GPU_vertbuf_create(GPU_USAGE_STATIC); } if (batch != NULL) { /* HACK set first vbo if not init. */ -- cgit v1.2.3