diff options
author | Clément Foucault <foucault.clem@gmail.com> | 2018-12-08 17:53:23 +0300 |
---|---|---|
committer | Clément Foucault <foucault.clem@gmail.com> | 2018-12-10 21:02:17 +0300 |
commit | a99eb0ca689c8116964032faf8425cfba16759bc (patch) | |
tree | 1e189688e8aab59c01f1fadf24ce523fc969069c /source/blender/gpu/intern | |
parent | f179ac9fc163b1f94efe7079357a31beb9fcd544 (diff) |
GPU: Cleanup: Rename vbo to ibo for index buffers
Diffstat (limited to 'source/blender/gpu/intern')
-rw-r--r-- | source/blender/gpu/intern/gpu_element.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/source/blender/gpu/intern/gpu_element.c b/source/blender/gpu/intern/gpu_element.c index b8ce4faabea..5efb193c3ad 100644 --- a/source/blender/gpu/intern/gpu_element.c +++ b/source/blender/gpu/intern/gpu_element.c @@ -284,14 +284,14 @@ void GPU_indexbuf_build_in_place(GPUIndexBufBuilder *builder, GPUIndexBuf *elem) elem->gl_index_type = convert_index_type_to_gl(elem->index_type); #endif - if (elem->vbo_id == 0) { - elem->vbo_id = GPU_buf_alloc(); + if (elem->ibo_id == 0) { + elem->ibo_id = GPU_buf_alloc(); } /* send data to GPU */ /* GL_ELEMENT_ARRAY_BUFFER changes the state of the last VAO bound, * so we use the GL_ARRAY_BUFFER here to create a buffer without * interfering in the VAO state. */ - glBindBuffer(GL_ARRAY_BUFFER, elem->vbo_id); + glBindBuffer(GL_ARRAY_BUFFER, elem->ibo_id); glBufferData(GL_ARRAY_BUFFER, GPU_indexbuf_size_get(elem), builder->data, GL_STATIC_DRAW); /* discard builder (one-time use) */ @@ -302,13 +302,13 @@ void GPU_indexbuf_build_in_place(GPUIndexBufBuilder *builder, GPUIndexBuf *elem) void GPU_indexbuf_use(GPUIndexBuf *elem) { - glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, elem->vbo_id); + glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, elem->ibo_id); } void GPU_indexbuf_discard(GPUIndexBuf *elem) { - if (elem->vbo_id) { - GPU_buf_free(elem->vbo_id); + if (elem->ibo_id) { + GPU_buf_free(elem->ibo_id); } MEM_freeN(elem); } |