From c2f5cd8f6454bf8256a39a5fc9cb075311e25c58 Mon Sep 17 00:00:00 2001 From: Mike Erwin Date: Tue, 4 Apr 2017 20:45:23 -0400 Subject: Gawain: add VertexBuffer prefix to functions See intern/gawain for the API change. Other files are updated to use the new names. --- .../blender/editors/uvedit/uvedit_smart_stitch.c | 30 +++++++++++----------- 1 file changed, 15 insertions(+), 15 deletions(-) (limited to 'source/blender/editors/uvedit') diff --git a/source/blender/editors/uvedit/uvedit_smart_stitch.c b/source/blender/editors/uvedit/uvedit_smart_stitch.c index 014aa65efb5..b940de4a727 100644 --- a/source/blender/editors/uvedit/uvedit_smart_stitch.c +++ b/source/blender/editors/uvedit/uvedit_smart_stitch.c @@ -1560,7 +1560,7 @@ static void stitch_draw(const bContext *UNUSED(C), ARegion *UNUSED(ar), void *ar float col[4]; static VertexFormat format = { 0 }; - static unsigned pos_id; + static unsigned int pos_id; if (format.attrib_ct == 0) { pos_id = add_attrib(&format, "pos", GL_FLOAT, 2, KEEP_FLOAT); } @@ -1572,7 +1572,7 @@ static void stitch_draw(const bContext *UNUSED(C), ARegion *UNUSED(ar), void *ar vbo = VertexBuffer_create_with_format(&format); VertexBuffer_allocate_data(vbo, stitch_preview->num_static_tris * 3); for (int i = 0; i < stitch_preview->num_static_tris * 3; i++) - setAttrib(vbo, pos_id, i, &stitch_preview->static_tris[i*2]); + VertexBuffer_set_attrib(vbo, pos_id, i, &stitch_preview->static_tris[i*2]); stitch_draw_vbo(vbo, GL_TRIANGLES, col); @@ -1593,21 +1593,21 @@ static void stitch_draw(const bContext *UNUSED(C), ARegion *UNUSED(ar), void *ar BLI_assert(stitch_preview->uvs_per_polygon[i] >= 3); /* Start line */ - setAttrib(vbo_line, pos_id, line_idx++, &stitch_preview->preview_polys[index]); - setAttrib(vbo_line, pos_id, line_idx++, &stitch_preview->preview_polys[index + 2]); + VertexBuffer_set_attrib(vbo_line, pos_id, line_idx++, &stitch_preview->preview_polys[index]); + VertexBuffer_set_attrib(vbo_line, pos_id, line_idx++, &stitch_preview->preview_polys[index + 2]); for (j = 1; j < stitch_preview->uvs_per_polygon[i] - 1; ++j) { - setAttrib(vbo, pos_id, tri_idx++, &stitch_preview->preview_polys[index]); - setAttrib(vbo, pos_id, tri_idx++, &stitch_preview->preview_polys[index + (j+0)*2]); - setAttrib(vbo, pos_id, tri_idx++, &stitch_preview->preview_polys[index + (j+1)*2]); + VertexBuffer_set_attrib(vbo, pos_id, tri_idx++, &stitch_preview->preview_polys[index]); + VertexBuffer_set_attrib(vbo, pos_id, tri_idx++, &stitch_preview->preview_polys[index + (j+0)*2]); + VertexBuffer_set_attrib(vbo, pos_id, tri_idx++, &stitch_preview->preview_polys[index + (j+1)*2]); - setAttrib(vbo_line, pos_id, line_idx++, &stitch_preview->preview_polys[index + (j+0)*2]); - setAttrib(vbo_line, pos_id, line_idx++, &stitch_preview->preview_polys[index + (j+1)*2]); + VertexBuffer_set_attrib(vbo_line, pos_id, line_idx++, &stitch_preview->preview_polys[index + (j+0)*2]); + VertexBuffer_set_attrib(vbo_line, pos_id, line_idx++, &stitch_preview->preview_polys[index + (j+1)*2]); } /* Closing line */ - setAttrib(vbo_line, pos_id, line_idx++, &stitch_preview->preview_polys[index]); - setAttrib(vbo_line, pos_id, line_idx++, &stitch_preview->preview_polys[index + j*2]); /* j = uvs_per_polygon[i] - 1*/ + VertexBuffer_set_attrib(vbo_line, pos_id, line_idx++, &stitch_preview->preview_polys[index]); + VertexBuffer_set_attrib(vbo_line, pos_id, line_idx++, &stitch_preview->preview_polys[index + j*2]); /* j = uvs_per_polygon[i] - 1*/ index += stitch_preview->uvs_per_polygon[i] * 2; } @@ -1627,14 +1627,14 @@ static void stitch_draw(const bContext *UNUSED(C), ARegion *UNUSED(ar), void *ar vbo = VertexBuffer_create_with_format(&format); VertexBuffer_allocate_data(vbo, stitch_preview->num_stitchable); for (int i = 0; i < stitch_preview->num_stitchable; i++) - setAttrib(vbo, pos_id, i, &stitch_preview->preview_stitchable[i*2]); + VertexBuffer_set_attrib(vbo, pos_id, i, &stitch_preview->preview_stitchable[i*2]); stitch_draw_vbo(vbo, GL_POINTS, col); UI_GetThemeColor4fv(TH_STITCH_PREVIEW_UNSTITCHABLE, col); vbo = VertexBuffer_create_with_format(&format); VertexBuffer_allocate_data(vbo, stitch_preview->num_unstitchable); for (int i = 0; i < stitch_preview->num_unstitchable; i++) - setAttrib(vbo, pos_id, i, &stitch_preview->preview_unstitchable[i*2]); + VertexBuffer_set_attrib(vbo, pos_id, i, &stitch_preview->preview_unstitchable[i*2]); stitch_draw_vbo(vbo, GL_POINTS, col); } else { @@ -1642,14 +1642,14 @@ static void stitch_draw(const bContext *UNUSED(C), ARegion *UNUSED(ar), void *ar vbo = VertexBuffer_create_with_format(&format); VertexBuffer_allocate_data(vbo, stitch_preview->num_stitchable * 2); for (int i = 0; i < stitch_preview->num_stitchable * 2; i++) - setAttrib(vbo, pos_id, i, &stitch_preview->preview_stitchable[i*2]); + VertexBuffer_set_attrib(vbo, pos_id, i, &stitch_preview->preview_stitchable[i*2]); stitch_draw_vbo(vbo, GL_LINES, col); UI_GetThemeColor4fv(TH_STITCH_PREVIEW_UNSTITCHABLE, col); vbo = VertexBuffer_create_with_format(&format); VertexBuffer_allocate_data(vbo, stitch_preview->num_unstitchable * 2); for (int i = 0; i < stitch_preview->num_unstitchable * 2; i++) - setAttrib(vbo, pos_id, i, &stitch_preview->preview_unstitchable[i*2]); + VertexBuffer_set_attrib(vbo, pos_id, i, &stitch_preview->preview_unstitchable[i*2]); stitch_draw_vbo(vbo, GL_LINES, col); } } -- cgit v1.2.3