diff options
author | Clément Foucault <foucault.clem@gmail.com> | 2020-09-06 23:09:51 +0300 |
---|---|---|
committer | Clément Foucault <foucault.clem@gmail.com> | 2020-09-06 23:13:06 +0300 |
commit | d268a43b25f7655db385fd3664301810bdef0c14 (patch) | |
tree | 68d8688945dba208156fd006309819b200321a84 /source/blender/gpu | |
parent | 158cea83b5bbe4bd57f4ca9cd4f6fe9a0624e00b (diff) |
Cleanup: GPUVertBuf: Replace GPU_vertbuf_create by GPU_vertbuf_calloc
This is a simple cleanup to make naming consistent with the rest of the
module.
Diffstat (limited to 'source/blender/gpu')
-rw-r--r-- | source/blender/gpu/GPU_vertex_buffer.h | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/source/blender/gpu/GPU_vertex_buffer.h b/source/blender/gpu/GPU_vertex_buffer.h index 070c93df412..efed2725e27 100644 --- a/source/blender/gpu/GPU_vertex_buffer.h +++ b/source/blender/gpu/GPU_vertex_buffer.h @@ -49,7 +49,7 @@ extern "C" { #define VRAM_USAGE 1 /** * How to create a #GPUVertBuf: - * 1) verts = GPU_vertbuf_create() or GPU_vertbuf_init(verts) + * 1) verts = GPU_vertbuf_calloc() * 2) GPU_vertformat_attr_add(verts->format, ...) * 3) GPU_vertbuf_data_alloc(verts, vertex_len) <-- finalizes/packs vertex format * 4) GPU_vertbuf_attr_fill(verts, pos, application_pos_buffer) @@ -64,6 +64,8 @@ typedef enum { typedef struct GPUVertBuf GPUVertBuf; +#define GPU_vertbuf_calloc() GPU_vertbuf_create(GPU_USAGE_STATIC); + GPUVertBuf *GPU_vertbuf_create(GPUUsageType); GPUVertBuf *GPU_vertbuf_create_with_format_ex(const GPUVertFormat *, GPUUsageType); |