diff options
author | Mike Erwin <significant.bit@gmail.com> | 2017-03-24 04:36:34 +0300 |
---|---|---|
committer | Mike Erwin <significant.bit@gmail.com> | 2017-03-27 04:23:54 +0300 |
commit | 67ffad8cd2b44d7685ec5aec2a76e1cb13d9f7a1 (patch) | |
tree | 3b62b443ab3602476c9f1fe1f42549d4d85f2b41 /source/blender/editors/screen/glutil.c | |
parent | 59c562337291217c2fbd48adc8b3862c24771d09 (diff) |
OpenGL: remove several glMatrixMode calls
A few of these were redundant, others could be converted to new matrix API.
Part of T49450
Diffstat (limited to 'source/blender/editors/screen/glutil.c')
-rw-r--r-- | source/blender/editors/screen/glutil.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/source/blender/editors/screen/glutil.c b/source/blender/editors/screen/glutil.c index 10db4edd85b..c66268beb9f 100644 --- a/source/blender/editors/screen/glutil.c +++ b/source/blender/editors/screen/glutil.c @@ -559,6 +559,10 @@ void glaDefine2DArea(rcti *screen_rect) * Programming Guide, Appendix H, Correctness Tips. */ +#if 1 /* new style */ + gpuOrtho2D(GLA_PIXEL_OFS, sc_w + GLA_PIXEL_OFS, GLA_PIXEL_OFS, sc_h + GLA_PIXEL_OFS); + gpuLoadIdentity(); +#else /* original */ glMatrixMode(GL_PROJECTION); gpuLoadIdentity(); glOrtho(0.0, sc_w, 0.0, sc_h, -1, 1); @@ -566,6 +570,7 @@ void glaDefine2DArea(rcti *screen_rect) glMatrixMode(GL_MODELVIEW); gpuLoadIdentity(); +#endif } /* TODO(merwin): put the following 2D code to use, or build new 2D code inspired & informd by it */ |