diff options
Diffstat (limited to 'source/blender/gpu/intern/gpu_buffers.c')
-rw-r--r-- | source/blender/gpu/intern/gpu_buffers.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/source/blender/gpu/intern/gpu_buffers.c b/source/blender/gpu/intern/gpu_buffers.c index 688386810ea..1a4750652cc 100644 --- a/source/blender/gpu/intern/gpu_buffers.c +++ b/source/blender/gpu/intern/gpu_buffers.c @@ -126,29 +126,29 @@ static void gpu_material_diffuse_get(int UNUSED(nr), float diff[4]) /* Allocates a non-initialized buffer to be sent to GPU. * Return is false it indicates that the memory map failed. */ -static bool gpu_pbvh_vert_buf_data_set(GPU_PBVH_Buffers *buffers, unsigned int vert_ct) +static bool gpu_pbvh_vert_buf_data_set(GPU_PBVH_Buffers *buffers, unsigned int vert_len) { if (buffers->vert_buf == NULL) { /* Initialize vertex buffer */ /* match 'VertexBufferFormat' */ static Gwn_VertFormat format = {0}; - if (format.attrib_ct == 0) { + if (format.attr_len == 0) { g_vbo_id.pos = GWN_vertformat_attr_add(&format, "pos", GWN_COMP_F32, 3, GWN_FETCH_FLOAT); g_vbo_id.nor = GWN_vertformat_attr_add(&format, "nor", GWN_COMP_I16, 3, GWN_FETCH_INT_TO_FLOAT_UNIT); g_vbo_id.col = GWN_vertformat_attr_add(&format, "color", GWN_COMP_U8, 3, GWN_FETCH_INT_TO_FLOAT_UNIT); } #if 0 buffers->vert_buf = GWN_vertbuf_create_with_format_ex(&format, GWN_USAGE_DYNAMIC); - GWN_vertbuf_data_alloc(buffers->vert_buf, vert_ct); + GWN_vertbuf_data_alloc(buffers->vert_buf, vert_len); } - else if (vert_ct != buffers->vert_buf->vertex_ct) { - GWN_vertbuf_data_resize(buffers->vert_buf, vert_ct); + else if (vert_len != buffers->vert_buf->vertex_len) { + GWN_vertbuf_data_resize(buffers->vert_buf, vert_len); } #else buffers->vert_buf = GWN_vertbuf_create_with_format_ex(&format, GWN_USAGE_STATIC); } - GWN_vertbuf_data_alloc(buffers->vert_buf, vert_ct); + GWN_vertbuf_data_alloc(buffers->vert_buf, vert_len); #endif return buffers->vert_buf->data != NULL; } |