From 67ffad8cd2b44d7685ec5aec2a76e1cb13d9f7a1 Mon Sep 17 00:00:00 2001 From: Mike Erwin Date: Thu, 23 Mar 2017 21:36:34 -0400 Subject: OpenGL: remove several glMatrixMode calls A few of these were redundant, others could be converted to new matrix API. Part of T49450 --- source/blender/editors/screen/glutil.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'source/blender/editors/screen/glutil.c') 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 */ -- cgit v1.2.3