diff options
author | Campbell Barton <ideasman42@gmail.com> | 2014-10-08 16:00:30 +0400 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2014-10-08 16:01:51 +0400 |
commit | 67943af47a8ded8fab73141f7e03f140bbe80b55 (patch) | |
tree | 40fa6b4bc1432cfb1b68f29842dfe1704e1f281c /source/blender/editors/screen | |
parent | 5c829d2c4e39c85b82c7ef5d2d4a5810ae6335e6 (diff) |
glutil: use ints for drawing functions
shorts would wrap sometimes & many inputs were ints already.
Diffstat (limited to 'source/blender/editors/screen')
-rw-r--r-- | source/blender/editors/screen/glutil.c | 46 | ||||
-rw-r--r-- | source/blender/editors/screen/screen_edit.c | 2 |
2 files changed, 24 insertions, 24 deletions
diff --git a/source/blender/editors/screen/glutil.c b/source/blender/editors/screen/glutil.c index 0edde66ffff..c095dfe7792 100644 --- a/source/blender/editors/screen/glutil.c +++ b/source/blender/editors/screen/glutil.c @@ -224,15 +224,15 @@ void fdrawcheckerboard(float x1, float y1, float x2, float y2) glDisable(GL_POLYGON_STIPPLE); } -void sdrawline(short x1, short y1, short x2, short y2) +void sdrawline(int x1, int y1, int x2, int y2) { - short v[2]; + int v[2]; glBegin(GL_LINE_STRIP); v[0] = x1; v[1] = y1; - glVertex2sv(v); + glVertex2iv(v); v[0] = x2; v[1] = y2; - glVertex2sv(v); + glVertex2iv(v); glEnd(); } @@ -246,25 +246,25 @@ void sdrawline(short x1, short y1, short x2, short y2) * x1,y1-- x2,y1 */ -static void sdrawtripoints(short x1, short y1, short x2, short y2) +static void sdrawtripoints(int x1, int y1, int x2, int y2) { - short v[2]; + int v[2]; v[0] = x1; v[1] = y1; - glVertex2sv(v); + glVertex2iv(v); v[0] = x1; v[1] = y2; - glVertex2sv(v); + glVertex2iv(v); v[0] = x2; v[1] = y1; - glVertex2sv(v); + glVertex2iv(v); } -void sdrawtri(short x1, short y1, short x2, short y2) +void sdrawtri(int x1, int y1, int x2, int y2) { glBegin(GL_LINE_STRIP); sdrawtripoints(x1, y1, x2, y2); glEnd(); } -void sdrawtrifill(short x1, short y1, short x2, short y2) +void sdrawtrifill(int x1, int y1, int x2, int y2) { glBegin(GL_TRIANGLES); sdrawtripoints(x1, y1, x2, y2); @@ -272,22 +272,22 @@ void sdrawtrifill(short x1, short y1, short x2, short y2) } #endif -void sdrawbox(short x1, short y1, short x2, short y2) +void sdrawbox(int x1, int y1, int x2, int y2) { - short v[2]; + int v[2]; glBegin(GL_LINE_STRIP); v[0] = x1; v[1] = y1; - glVertex2sv(v); + glVertex2iv(v); v[0] = x1; v[1] = y2; - glVertex2sv(v); + glVertex2iv(v); v[0] = x2; v[1] = y2; - glVertex2sv(v); + glVertex2iv(v); v[0] = x2; v[1] = y1; - glVertex2sv(v); + glVertex2iv(v); v[0] = x1; v[1] = y1; - glVertex2sv(v); + glVertex2iv(v); glEnd(); } @@ -339,7 +339,7 @@ void sdrawXORline(int x0, int y0, int x1, int y1) void sdrawXORline4(int nr, int x0, int y0, int x1, int y1) { - static short old[4][2][2]; + static int old[4][2][2]; static char flags[4] = {0, 0, 0, 0}; /* with builtin memory, max 4 lines */ @@ -350,8 +350,8 @@ void sdrawXORline4(int nr, int x0, int y0, int x1, int y1) if (nr == -1) { /* flush */ for (nr = 0; nr < 4; nr++) { if (flags[nr]) { - glVertex2sv(old[nr][0]); - glVertex2sv(old[nr][1]); + glVertex2iv(old[nr][0]); + glVertex2iv(old[nr][1]); flags[nr] = 0; } } @@ -359,8 +359,8 @@ void sdrawXORline4(int nr, int x0, int y0, int x1, int y1) else { if (nr >= 0 && nr < 4) { if (flags[nr]) { - glVertex2sv(old[nr][0]); - glVertex2sv(old[nr][1]); + glVertex2iv(old[nr][0]); + glVertex2iv(old[nr][1]); } old[nr][0][0] = x0; diff --git a/source/blender/editors/screen/screen_edit.c b/source/blender/editors/screen/screen_edit.c index 5beab9fcc14..12236e3779d 100644 --- a/source/blender/editors/screen/screen_edit.c +++ b/source/blender/editors/screen/screen_edit.c @@ -1009,7 +1009,7 @@ static void scrarea_draw_shape_light(ScrArea *sa, char UNUSED(dir)) glDisable(GL_BLEND); } -static void drawscredge_area_draw(int sizex, int sizey, short x1, short y1, short x2, short y2, short a) +static void drawscredge_area_draw(int sizex, int sizey, int x1, int y1, int x2, int y2, int a) { /* right border area */ if (x2 < sizex - 1) |