Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorClément Foucault <foucault.clem@gmail.com>2020-08-10 02:40:23 +0300
committerClément Foucault <foucault.clem@gmail.com>2020-08-13 15:20:23 +0300
commit157f2a20e6bd539604a0d5ff48a4b7741eb1952b (patch)
tree21d65f92d9cd6484940666ea37435fbcc566949f /source/blender/draw/intern/draw_cache_inline.h
parent00a3c297d254ee7acb375206d7ed0cf6f0ef9ef9 (diff)
GPU: Use GPU_vertbuf_create & GPU_indexbuf_calloc instead of manual alloc
Diffstat (limited to 'source/blender/draw/intern/draw_cache_inline.h')
-rw-r--r--source/blender/draw/intern/draw_cache_inline.h4
1 files changed, 2 insertions, 2 deletions
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. */