diff options
author | Mike Erwin <significant.bit@gmail.com> | 2017-04-08 07:50:36 +0300 |
---|---|---|
committer | Mike Erwin <significant.bit@gmail.com> | 2017-04-08 08:19:48 +0300 |
commit | 0947c97fade7a5400e22d85b1f61c5a0f552976a (patch) | |
tree | 181186c3c31706c3e0c813b62990c9186e2fc6f6 /source/blender/editors/uvedit | |
parent | 1de61696fd2ffc9d800a2eff964045b90c9f2347 (diff) |
OpenGL: use PRIM instead of GL enum everywhere else
Well, everywhere that uses Gawain for drawing. Places that call OpenGL directly still use GL enums.
Part of T49043
Diffstat (limited to 'source/blender/editors/uvedit')
-rw-r--r-- | source/blender/editors/uvedit/uvedit_smart_stitch.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/source/blender/editors/uvedit/uvedit_smart_stitch.c b/source/blender/editors/uvedit/uvedit_smart_stitch.c index 9d5b6495938..bcdaca450c6 100644 --- a/source/blender/editors/uvedit/uvedit_smart_stitch.c +++ b/source/blender/editors/uvedit/uvedit_smart_stitch.c @@ -1540,9 +1540,9 @@ static void stitch_calculate_edge_normal(BMEditMesh *em, UvEdge *edge, float *no normalize_v2(normal); } -static void stitch_draw_vbo(VertexBuffer *vbo, int type, const float col[4]) +static void stitch_draw_vbo(VertexBuffer *vbo, PrimitiveType prim_type, const float col[4]) { - Batch *batch = Batch_create(type, vbo, NULL); + Batch *batch = Batch_create(prim_type, vbo, NULL); Batch_set_builtin_program(batch, GPU_SHADER_2D_UNIFORM_COLOR); Batch_Uniform4fv(batch, "color", col); Batch_draw(batch); @@ -1573,7 +1573,7 @@ static void stitch_draw(const bContext *UNUSED(C), ARegion *UNUSED(ar), void *ar VertexBuffer_allocate_data(vbo, stitch_preview->num_static_tris * 3); for (int i = 0; i < stitch_preview->num_static_tris * 3; i++) VertexBuffer_set_attrib(vbo, pos_id, i, &stitch_preview->static_tris[i*2]); - stitch_draw_vbo(vbo, GL_TRIANGLES, col); + stitch_draw_vbo(vbo, PRIM_TRIANGLES, col); /* Preview Polys */ @@ -1612,9 +1612,9 @@ static void stitch_draw(const bContext *UNUSED(C), ARegion *UNUSED(ar), void *ar index += stitch_preview->uvs_per_polygon[i] * 2; } UI_GetThemeColor4fv(TH_STITCH_PREVIEW_FACE, col); - stitch_draw_vbo(vbo, GL_TRIANGLES, col); + stitch_draw_vbo(vbo, PRIM_TRIANGLES, col); UI_GetThemeColor4fv(TH_STITCH_PREVIEW_EDGE, col); - stitch_draw_vbo(vbo_line, GL_LINES, col); + stitch_draw_vbo(vbo_line, PRIM_LINES, col); glDisable(GL_BLEND); @@ -1628,14 +1628,14 @@ static void stitch_draw(const bContext *UNUSED(C), ARegion *UNUSED(ar), void *ar VertexBuffer_allocate_data(vbo, stitch_preview->num_stitchable); for (int i = 0; i < stitch_preview->num_stitchable; i++) VertexBuffer_set_attrib(vbo, pos_id, i, &stitch_preview->preview_stitchable[i*2]); - stitch_draw_vbo(vbo, GL_POINTS, col); + stitch_draw_vbo(vbo, PRIM_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++) VertexBuffer_set_attrib(vbo, pos_id, i, &stitch_preview->preview_unstitchable[i*2]); - stitch_draw_vbo(vbo, GL_POINTS, col); + stitch_draw_vbo(vbo, PRIM_POINTS, col); } else { UI_GetThemeColor4fv(TH_STITCH_PREVIEW_STITCHABLE, col); @@ -1643,14 +1643,14 @@ static void stitch_draw(const bContext *UNUSED(C), ARegion *UNUSED(ar), void *ar VertexBuffer_allocate_data(vbo, stitch_preview->num_stitchable * 2); for (int i = 0; i < stitch_preview->num_stitchable * 2; i++) VertexBuffer_set_attrib(vbo, pos_id, i, &stitch_preview->preview_stitchable[i*2]); - stitch_draw_vbo(vbo, GL_LINES, col); + stitch_draw_vbo(vbo, PRIM_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++) VertexBuffer_set_attrib(vbo, pos_id, i, &stitch_preview->preview_unstitchable[i*2]); - stitch_draw_vbo(vbo, GL_LINES, col); + stitch_draw_vbo(vbo, PRIM_LINES, col); } } |