[Bf-blender-cvs] [dd3f5186260] master: Cleanup: rename GPU function to set buffer length
Campbell Barton
noreply at git.blender.org
Mon Jan 21 01:32:40 CET 2019
Commit: dd3f5186260eddc2c115b560bb832baff0f108ae
Author: Campbell Barton
Date: Mon Jan 21 11:28:41 2019 +1100
Branches: master
https://developer.blender.org/rBdd3f5186260eddc2c115b560bb832baff0f108ae
Cleanup: rename GPU function to set buffer length
===================================================================
M source/blender/blenfont/intern/blf_font.c
M source/blender/editors/space_node/drawnode.c
M source/blender/gpu/GPU_vertex_buffer.h
M source/blender/gpu/intern/gpu_vertex_buffer.c
===================================================================
diff --git a/source/blender/blenfont/intern/blf_font.c b/source/blender/blenfont/intern/blf_font.c
index c5d39a05c5d..3296fbd1833 100644
--- a/source/blender/blenfont/intern/blf_font.c
+++ b/source/blender/blenfont/intern/blf_font.c
@@ -191,7 +191,7 @@ void blf_batch_draw(void)
UI_widgetbase_draw_cache_flush();
GPU_texture_bind(g_batch.tex_bind_state, 0);
- GPU_vertbuf_vertex_count_set(g_batch.verts, g_batch.glyph_len);
+ GPU_vertbuf_data_len_set(g_batch.verts, g_batch.glyph_len);
GPU_vertbuf_use(g_batch.verts); /* send data */
GPUBuiltinShader shader = (g_batch.simple_shader) ? GPU_SHADER_TEXT_SIMPLE : GPU_SHADER_TEXT;
diff --git a/source/blender/editors/space_node/drawnode.c b/source/blender/editors/space_node/drawnode.c
index 80cdc9ef87d..f2edeb2d1bc 100644
--- a/source/blender/editors/space_node/drawnode.c
+++ b/source/blender/editors/space_node/drawnode.c
@@ -3571,7 +3571,7 @@ static void nodelink_batch_draw(SpaceNode *snode)
UI_GetThemeColor4fv(TH_EDGE_SELECT, colors[nodelink_get_color_id(TH_EDGE_SELECT)]);
UI_GetThemeColor4fv(TH_REDALERT, colors[nodelink_get_color_id(TH_REDALERT)]);
- GPU_vertbuf_vertex_count_set(g_batch_link.inst_vbo, g_batch_link.count);
+ GPU_vertbuf_data_len_set(g_batch_link.inst_vbo, g_batch_link.count);
GPU_vertbuf_use(g_batch_link.inst_vbo); /* force update. */
GPU_batch_program_set_builtin(g_batch_link.batch, GPU_SHADER_2D_NODELINK_INST);
diff --git a/source/blender/gpu/GPU_vertex_buffer.h b/source/blender/gpu/GPU_vertex_buffer.h
index db1309bcede..cc508de2f00 100644
--- a/source/blender/gpu/GPU_vertex_buffer.h
+++ b/source/blender/gpu/GPU_vertex_buffer.h
@@ -77,7 +77,7 @@ void GPU_vertbuf_init_with_format_ex(GPUVertBuf *, const GPUVertFormat *, GPUUsa
uint GPU_vertbuf_size_get(const GPUVertBuf *);
void GPU_vertbuf_data_alloc(GPUVertBuf *, uint v_len);
void GPU_vertbuf_data_resize(GPUVertBuf *, uint v_len);
-void GPU_vertbuf_vertex_count_set(GPUVertBuf *, uint v_len);
+void GPU_vertbuf_data_len_set(GPUVertBuf *, uint v_len);
/* The most important set_attrib variant is the untyped one. Get it right first. */
/* It takes a void* so the app developer is responsible for matching their app data types */
diff --git a/source/blender/gpu/intern/gpu_vertex_buffer.c b/source/blender/gpu/intern/gpu_vertex_buffer.c
index a5c560fb17b..cf6ff1769ce 100644
--- a/source/blender/gpu/intern/gpu_vertex_buffer.c
+++ b/source/blender/gpu/intern/gpu_vertex_buffer.c
@@ -152,7 +152,7 @@ void GPU_vertbuf_data_resize(GPUVertBuf *verts, uint v_len)
/* Set vertex count but does not change allocation.
* Only this many verts will be uploaded to the GPU and rendered.
* This is useful for streaming data. */
-void GPU_vertbuf_vertex_count_set(GPUVertBuf *verts, uint v_len)
+void GPU_vertbuf_data_len_set(GPUVertBuf *verts, uint v_len)
{
#if TRUST_NO_ONE
assert(verts->data != NULL); /* only for dynamic data */
More information about the Bf-blender-cvs
mailing list