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-03-24 04:36:34 +0300
committerMike Erwin <significant.bit@gmail.com>2017-03-27 04:23:54 +0300
commit67ffad8cd2b44d7685ec5aec2a76e1cb13d9f7a1 (patch)
tree3b62b443ab3602476c9f1fe1f42549d4d85f2b41 /source/blender/windowmanager/intern/wm_playanim.c
parent59c562337291217c2fbd48adc8b3862c24771d09 (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/windowmanager/intern/wm_playanim.c')
-rw-r--r--source/blender/windowmanager/intern/wm_playanim.c7
1 files changed, 2 insertions, 5 deletions
diff --git a/source/blender/windowmanager/intern/wm_playanim.c b/source/blender/windowmanager/intern/wm_playanim.c
index 926220f8c6c..46c7599ec56 100644
--- a/source/blender/windowmanager/intern/wm_playanim.c
+++ b/source/blender/windowmanager/intern/wm_playanim.c
@@ -192,10 +192,7 @@ static void playanim_window_get_size(int *r_width, int *r_height)
static void playanim_gl_matrix(void)
{
/* unified matrix, note it affects offset for drawing */
- glMatrixMode(GL_PROJECTION);
- gpuLoadIdentity();
- glOrtho(0.0f, 1.0f, 0.0f, 1.0f, -1.0f, 1.0f); /* XXX revisit this when 2D matrix API is complete */
- glMatrixMode(GL_MODELVIEW);
+ gpuOrtho2D(0.0f, 1.0f, 0.0f, 1.0f);
}
/* implementation */
@@ -356,7 +353,7 @@ static void playanim_toscreen(PlayState *ps, PlayAnimPict *picture, struct ImBuf
float fac = ps->picture->frame / (double)(((PlayAnimPict *)picsbase.last)->frame - ((PlayAnimPict *)picsbase.first)->frame);
fac = 2.0f * fac - 1.0f;
- glMatrixMode(GL_PROJECTION);
+ glMatrixMode(GL_PROJECTION); /* TODO: convert this nasty code */
gpuPushMatrix();
gpuLoadIdentity();
glMatrixMode(GL_MODELVIEW);