diff options
Diffstat (limited to 'source/blender/editors/screen')
-rw-r--r-- | source/blender/editors/screen/CMakeLists.txt | 3 | ||||
-rw-r--r-- | source/blender/editors/screen/SConscript | 5 | ||||
-rw-r--r-- | source/blender/editors/screen/glutil.c | 46 | ||||
-rw-r--r-- | source/blender/editors/screen/screen_edit.c | 2 |
4 files changed, 30 insertions, 26 deletions
diff --git a/source/blender/editors/screen/CMakeLists.txt b/source/blender/editors/screen/CMakeLists.txt index 4ff1767f582..413d40b9f9c 100644 --- a/source/blender/editors/screen/CMakeLists.txt +++ b/source/blender/editors/screen/CMakeLists.txt @@ -30,6 +30,7 @@ set(INC ../../makesrna ../../windowmanager ../../../../intern/guardedalloc + ../../../../intern/glew-mx ) set(INC_SYS @@ -51,4 +52,6 @@ if(WITH_INTERNATIONAL) add_definitions(-DWITH_INTERNATIONAL) endif() +add_definitions(${GL_DEFINITIONS}) + blender_add_lib(bf_editor_screen "${SRC}" "${INC}" "${INC_SYS}") diff --git a/source/blender/editors/screen/SConscript b/source/blender/editors/screen/SConscript index 28a6cbb02e6..f5442c7ea63 100644 --- a/source/blender/editors/screen/SConscript +++ b/source/blender/editors/screen/SConscript @@ -31,7 +31,8 @@ sources = env.Glob('*.c') incs = [ '#/intern/guardedalloc', - '#/extern/glew/include', + env['BF_GLEW_INC'], + '#/intern/glew-mx', '../include', '../../blenfont', '../../blenkernel', @@ -45,7 +46,7 @@ incs = [ ] incs = ' '.join(incs) -defs = [] +defs = env['BF_GL_DEFINITIONS'] if env['OURPLATFORM'] in ('win32-vc', 'win32-mingw', 'linuxcross', 'win64-vc', 'win64-mingw'): incs += ' ' + env['BF_PTHREADS_INC'] 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) |