Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Erwin <significant.bit@gmail.com>2017-04-05 03:45:23 +0300
committerMike Erwin <significant.bit@gmail.com>2017-04-06 08:18:12 +0300
commitc2f5cd8f6454bf8256a39a5fc9cb075311e25c58 (patch)
treec0c9f803f810c2be81c9b302d814ac4989a559ed /source/blender/editors/uvedit/uvedit_smart_stitch.c
parent957b408458140d1cfc72395d62189918bac5b5c7 (diff)
Gawain: add VertexBuffer prefix to functions
See intern/gawain for the API change. Other files are updated to use the new names.
Diffstat (limited to 'source/blender/editors/uvedit/uvedit_smart_stitch.c')
-rw-r--r--source/blender/editors/uvedit/uvedit_smart_stitch.c30
1 files changed, 15 insertions, 15 deletions
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);
}
}