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-07 23:31:26 +0300
committerMike Erwin <significant.bit@gmail.com>2017-04-07 23:31:26 +0300
commitbd3a1b9490d96ca00748f405037379b743744877 (patch)
treeaed8ff42fb92cc78de6729cd6d90c3c5ee9ad8ca /source/blender/editors/sculpt_paint
parentc1dc078840541bd64f95fdeca52267c75a061e04 (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/sculpt_paint')
-rw-r--r--source/blender/editors/sculpt_paint/paint_cursor.c10
-rw-r--r--source/blender/editors/sculpt_paint/paint_image.c4
-rw-r--r--source/blender/editors/sculpt_paint/paint_stroke.c6
3 files changed, 10 insertions, 10 deletions
diff --git a/source/blender/editors/sculpt_paint/paint_cursor.c b/source/blender/editors/sculpt_paint/paint_cursor.c
index 9405de93cc5..744044e89e1 100644
--- a/source/blender/editors/sculpt_paint/paint_cursor.c
+++ b/source/blender/editors/sculpt_paint/paint_cursor.c
@@ -888,7 +888,7 @@ BLI_INLINE void draw_bezier_handle_lines(unsigned int pos, float sel_col[4], Bez
immUniformColor4f(0.0f, 0.0f, 0.0f, 0.5f);
glLineWidth(3.0f);
- immBegin(GL_LINE_STRIP, 3);
+ immBegin(PRIM_LINE_STRIP, 3);
immVertex2fv(pos, bez->vec[0]);
immVertex2fv(pos, bez->vec[1]);
immVertex2fv(pos, bez->vec[2]);
@@ -902,7 +902,7 @@ BLI_INLINE void draw_bezier_handle_lines(unsigned int pos, float sel_col[4], Bez
else {
immUniformColor4f(1.0f, 1.0f, 1.0f, 0.5f);
}
- immBegin(GL_LINES, 2);
+ immBegin(PRIM_LINES, 2);
immVertex2fv(pos, bez->vec[0]);
immVertex2fv(pos, bez->vec[1]);
immEnd();
@@ -913,7 +913,7 @@ BLI_INLINE void draw_bezier_handle_lines(unsigned int pos, float sel_col[4], Bez
else {
immUniformColor4f(1.0f, 1.0f, 1.0f, 0.5f);
}
- immBegin(GL_LINES, 2);
+ immBegin(PRIM_LINES, 2);
immVertex2fv(pos, bez->vec[1]);
immVertex2fv(pos, bez->vec[2]);
immEnd();
@@ -961,7 +961,7 @@ static void paint_draw_curve_cursor(Brush *brush)
immUniformColor4f(0.0f, 0.0f, 0.0f, 0.5f);
glLineWidth(3.0f);
- immBegin(GL_LINE_STRIP, PAINT_CURVE_NUM_SEGMENTS + 1);
+ immBegin(PRIM_LINE_STRIP, PAINT_CURVE_NUM_SEGMENTS + 1);
for (j = 0; j <= PAINT_CURVE_NUM_SEGMENTS; j++) {
immVertex2fv(pos, v[j]);
}
@@ -969,7 +969,7 @@ static void paint_draw_curve_cursor(Brush *brush)
immUniformColor4f(0.9f, 0.9f, 1.0f, 0.5f);
glLineWidth(1.0f);
- immBegin(GL_LINE_STRIP, PAINT_CURVE_NUM_SEGMENTS + 1);
+ immBegin(PRIM_LINE_STRIP, PAINT_CURVE_NUM_SEGMENTS + 1);
for (j = 0; j <= PAINT_CURVE_NUM_SEGMENTS; j++) {
immVertex2fv(pos, v[j]);
}
diff --git a/source/blender/editors/sculpt_paint/paint_image.c b/source/blender/editors/sculpt_paint/paint_image.c
index 7bc46e1741c..1b18dd4e41c 100644
--- a/source/blender/editors/sculpt_paint/paint_image.c
+++ b/source/blender/editors/sculpt_paint/paint_image.c
@@ -729,7 +729,7 @@ static void gradient_draw_line(bContext *UNUSED(C), int x, int y, void *customda
glLineWidth(4.0);
immUniformColor4ub(0, 0, 0, 255);
- immBegin(GL_LINES, 2);
+ immBegin(PRIM_LINES, 2);
immVertex2i(pos, x, y);
immVertex2i(pos, pop->startmouse[0], pop->startmouse[1]);
immEnd();
@@ -737,7 +737,7 @@ static void gradient_draw_line(bContext *UNUSED(C), int x, int y, void *customda
glLineWidth(2.0);
immUniformColor4ub(255, 255, 255, 255);
- immBegin(GL_LINES, 2);
+ immBegin(PRIM_LINES, 2);
immVertex2i(pos, x, y);
immVertex2i(pos, pop->startmouse[0], pop->startmouse[1]);
immEnd();
diff --git a/source/blender/editors/sculpt_paint/paint_stroke.c b/source/blender/editors/sculpt_paint/paint_stroke.c
index 9fd46424dfd..d882baf6251 100644
--- a/source/blender/editors/sculpt_paint/paint_stroke.c
+++ b/source/blender/editors/sculpt_paint/paint_stroke.c
@@ -150,7 +150,7 @@ static void paint_draw_smooth_cursor(bContext *C, int x, int y, void *customdata
immBindBuiltinProgram(GPU_SHADER_2D_UNIFORM_COLOR);
immUniformColor4ubv(paint->paint_cursor_col);
- immBegin(GL_LINES, 2);
+ immBegin(PRIM_LINES, 2);
immVertex2f(pos, x, y);
immVertex2f(pos, stroke->last_mouse_position[0], stroke->last_mouse_position[1]);
immEnd();
@@ -178,7 +178,7 @@ static void paint_draw_line_cursor(bContext *C, int x, int y, void *customdata)
immUniformColor4ub(0, 0, 0, paint->paint_cursor_col[3]);
- immBegin(GL_LINES, 2);
+ immBegin(PRIM_LINES, 2);
if (stroke->constrain_line) {
immVertex2f(pos, stroke->last_mouse_position[0], stroke->last_mouse_position[1]);
@@ -194,7 +194,7 @@ static void paint_draw_line_cursor(bContext *C, int x, int y, void *customdata)
glLineWidth(1.0f);
immUniformColor4ub(255, 255, 255, paint->paint_cursor_col[3]);
- immBegin(GL_LINES, 2);
+ immBegin(PRIM_LINES, 2);
if (stroke->constrain_line) {
immVertex2f(pos, stroke->last_mouse_position[0], stroke->last_mouse_position[1]);