diff options
author | Mike Erwin <significant.bit@gmail.com> | 2017-04-07 23:31:26 +0300 |
---|---|---|
committer | Mike Erwin <significant.bit@gmail.com> | 2017-04-07 23:31:26 +0300 |
commit | bd3a1b9490d96ca00748f405037379b743744877 (patch) | |
tree | aed8ff42fb92cc78de6729cd6d90c3c5ee9ad8ca /source/blender/editors/space_node | |
parent | c1dc078840541bd64f95fdeca52267c75a061e04 (diff) |
OpenGL: use PRIM instead of GL enum for immBegin
Getting ready for a Gawain API change...
Part of T49043
Diffstat (limited to 'source/blender/editors/space_node')
-rw-r--r-- | source/blender/editors/space_node/drawnode.c | 18 | ||||
-rw-r--r-- | source/blender/editors/space_node/node_draw.c | 4 |
2 files changed, 11 insertions, 11 deletions
diff --git a/source/blender/editors/space_node/drawnode.c b/source/blender/editors/space_node/drawnode.c index 9e5ae46b5ff..6620dec4130 100644 --- a/source/blender/editors/space_node/drawnode.c +++ b/source/blender/editors/space_node/drawnode.c @@ -2163,7 +2163,7 @@ static void node_composit_backdrop_viewer(SpaceNode *snode, ImBuf *backdrop, bNo immUniformColor3f(1.0f, 1.0f, 1.0f); - immBegin(GL_LINES, 4); + immBegin(PRIM_LINES, 4); immVertex2f(pos, cx - 25, cy - 25); immVertex2f(pos, cx + 25, cy + 25); immVertex2f(pos, cx + 25, cy - 25); @@ -2208,7 +2208,7 @@ static void node_composit_backdrop_boxmask(SpaceNode *snode, ImBuf *backdrop, bN immUniformColor3f(1.0f, 1.0f, 1.0f); - immBegin(GL_LINE_LOOP, 4); + immBegin(PRIM_LINE_LOOP, 4); immVertex2f(pos, x1, y1); immVertex2f(pos, x2, y2); immVertex2f(pos, x3, y3); @@ -2252,7 +2252,7 @@ static void node_composit_backdrop_ellipsemask(SpaceNode *snode, ImBuf *backdrop immUniformColor3f(1.0f, 1.0f, 1.0f); - immBegin(GL_LINE_LOOP, 4); + immBegin(PRIM_LINE_LOOP, 4); immVertex2f(pos, x1, y1); immVertex2f(pos, x2, y2); immVertex2f(pos, x3, y3); @@ -3412,7 +3412,7 @@ void node_draw_link_bezier(View2D *v2d, SpaceNode *snode, bNodeLink *link, immUniformThemeColorShadeAlpha(th_col3, -80, -120); glLineWidth(4.0f * px_fac); - immBegin(GL_LINE_STRIP, (LINK_RESOL + 1)); + immBegin(PRIM_LINE_STRIP, (LINK_RESOL + 1)); for (i = 0; i <= LINK_RESOL; i++) { immVertex2fv(pos, coord_array[i]); @@ -3421,7 +3421,7 @@ void node_draw_link_bezier(View2D *v2d, SpaceNode *snode, bNodeLink *link, immEnd(); if (drawarrow) { - immBegin(GL_LINE_STRIP, 3); + immBegin(PRIM_LINE_STRIP, 3); immVertex2fv(pos, arrow1); immVertex2fv(pos, arrow); immVertex2fv(pos, arrow2); @@ -3434,7 +3434,7 @@ void node_draw_link_bezier(View2D *v2d, SpaceNode *snode, bNodeLink *link, if (drawarrow) { immUniformThemeColorBlend(th_col1, th_col2, 0.5f); - immBegin(GL_LINE_STRIP, 3); + immBegin(PRIM_LINE_STRIP, 3); immVertex2fv(pos, arrow1); immVertex2fv(pos, arrow); immVertex2fv(pos, arrow2); @@ -3444,7 +3444,7 @@ void node_draw_link_bezier(View2D *v2d, SpaceNode *snode, bNodeLink *link, if (!do_shaded) { immUniformThemeColor(th_col1); - immBegin(GL_LINE_STRIP, (LINK_RESOL + 1)); + immBegin(PRIM_LINE_STRIP, (LINK_RESOL + 1)); for (i = 0; i <= LINK_RESOL; i++) { immVertex2fv(pos, coord_array[i]); @@ -3466,7 +3466,7 @@ void node_draw_link_bezier(View2D *v2d, SpaceNode *snode, bNodeLink *link, immBindBuiltinProgram(GPU_SHADER_2D_SMOOTH_COLOR); - immBegin(GL_LINE_STRIP, (LINK_RESOL + 1)); + immBegin(PRIM_LINE_STRIP, (LINK_RESOL + 1)); for (i = 0; i <= LINK_RESOL; i++) { UI_GetThemeColorBlend3ubv(th_col1, th_col2, spline_step, col); @@ -3534,7 +3534,7 @@ void node_draw_link(View2D *v2d, SpaceNode *snode, bNodeLink *link) void ED_node_draw_snap(View2D *v2d, const float cent[2], float size, NodeBorder border, unsigned pos) { - immBegin(GL_LINES, 4); + immBegin(PRIM_LINES, 4); if (border & (NODE_LEFT | NODE_RIGHT)) { immVertex2f(pos, cent[0], v2d->cur.ymin); diff --git a/source/blender/editors/space_node/node_draw.c b/source/blender/editors/space_node/node_draw.c index 7f41fd91980..3e0adb3243f 100644 --- a/source/blender/editors/space_node/node_draw.c +++ b/source/blender/editors/space_node/node_draw.c @@ -779,7 +779,7 @@ void node_draw_sockets(View2D *v2d, const bContext *C, bNodeTree *ntree, bNode * immUniform1f("outlineWidth", 1.0f); immUniform4f("outlineColor", 0.0f, 0.0f, 0.0f, 0.6f); - immBeginAtMost(GL_POINTS, total_input_ct + total_output_ct); + immBeginAtMost(PRIM_POINTS, total_input_ct + total_output_ct); } /* socket inputs */ @@ -823,7 +823,7 @@ void node_draw_sockets(View2D *v2d, const bContext *C, bNodeTree *ntree, bNode * immUniform4f("outlineColor", c[0], c[1], c[2], 1.0f); immUniform1f("outlineWidth", 1.5f); - immBegin(GL_POINTS, selected_input_ct + selected_output_ct); + immBegin(PRIM_POINTS, selected_input_ct + selected_output_ct); if (selected_input_ct) { /* socket inputs */ |