Cleanup: rename GPU function to set buffer length
This commit is contained in:
@@ -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;
|
||||
|
||||
@@ -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);
|
||||
|
||||
@@ -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 */
|
||||
|
||||
@@ -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 */
|
||||
|
||||
Reference in New Issue
Block a user