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:
authorSergey Sharybin <sergey.vfx@gmail.com>2017-04-19 11:46:05 +0300
committerSergey Sharybin <sergey.vfx@gmail.com>2017-04-19 16:22:58 +0300
commit3f11be3f7de90517826cb114f648b06fc85b67d4 (patch)
tree3698f730600c6fe119df84c759376f5c2d4fc130 /source/blender/windowmanager/intern/wm_playanim.c
parent288892bf08f380afdfe7f2f8f5b1ca2d2e037fe3 (diff)
Get rid of glMatrixMode calls
With the explicit calls we don't need to worry about current state outside of the GPU module now. In fact. we don't need to worry about current matrix mode in core profile at all. Legacy OpenGL now has some code which ensures current matrix mode when using explicit calls to push/pop matrix.
Diffstat (limited to 'source/blender/windowmanager/intern/wm_playanim.c')
-rw-r--r--source/blender/windowmanager/intern/wm_playanim.c6
1 files changed, 1 insertions, 5 deletions
diff --git a/source/blender/windowmanager/intern/wm_playanim.c b/source/blender/windowmanager/intern/wm_playanim.c
index ebc79986198..373e0bf10ad 100644
--- a/source/blender/windowmanager/intern/wm_playanim.c
+++ b/source/blender/windowmanager/intern/wm_playanim.c
@@ -360,10 +360,8 @@ 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); /* TODO: convert this nasty code */
gpuPushProjectionMatrix();
- gpuLoadIdentity();
- glMatrixMode(GL_MODELVIEW);
+ gpuLoadIdentityProjectionMatrix();
gpuPushMatrix();
gpuLoadIdentity();
@@ -380,9 +378,7 @@ static void playanim_toscreen(PlayState *ps, PlayAnimPict *picture, struct ImBuf
immUnbindProgram();
gpuPopMatrix();
- glMatrixMode(GL_PROJECTION);
gpuPopProjectionMatrix();
- glMatrixMode(GL_MODELVIEW);
}
GHOST_SwapWindowBuffers(g_WS.ghost_window);