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-21 09:51:02 +0300
committerMike Erwin <significant.bit@gmail.com>2017-03-21 09:51:02 +0300
commitd409c483104c36be82ff29ff06a39b40636355dc (patch)
treecf358ce124510a9b988afe34ffc264387fbee76e /source/blender/windowmanager/intern/wm_playanim.c
parent8fe9e94a529853415ef8db53aac40b8698ed29d9 (diff)
OpenGL: convert to new matrix API (part 3)
Part of T49450
Diffstat (limited to 'source/blender/windowmanager/intern/wm_playanim.c')
-rw-r--r--source/blender/windowmanager/intern/wm_playanim.c18
1 files changed, 10 insertions, 8 deletions
diff --git a/source/blender/windowmanager/intern/wm_playanim.c b/source/blender/windowmanager/intern/wm_playanim.c
index 75e82a18994..926220f8c6c 100644
--- a/source/blender/windowmanager/intern/wm_playanim.c
+++ b/source/blender/windowmanager/intern/wm_playanim.c
@@ -64,6 +64,8 @@
#include "BIF_gl.h"
#include "BIF_glutil.h"
+#include "GPU_matrix.h"
+
#include "DNA_scene_types.h"
#include "ED_datafiles.h" /* for fonts */
#include "GHOST_C-api.h"
@@ -191,8 +193,8 @@ static void playanim_gl_matrix(void)
{
/* unified matrix, note it affects offset for drawing */
glMatrixMode(GL_PROJECTION);
- glLoadIdentity();
- glOrtho(0.0f, 1.0f, 0.0f, 1.0f, -1.0f, 1.0f);
+ 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);
}
@@ -355,11 +357,11 @@ static void playanim_toscreen(PlayState *ps, PlayAnimPict *picture, struct ImBuf
fac = 2.0f * fac - 1.0f;
glMatrixMode(GL_PROJECTION);
- glPushMatrix();
- glLoadIdentity();
+ gpuPushMatrix();
+ gpuLoadIdentity();
glMatrixMode(GL_MODELVIEW);
- glPushMatrix();
- glLoadIdentity();
+ gpuPushMatrix();
+ gpuLoadIdentity();
glColor4f(0.0f, 1.0f, 0.0f, 1.0f);
@@ -368,9 +370,9 @@ static void playanim_toscreen(PlayState *ps, PlayAnimPict *picture, struct ImBuf
glVertex2f(fac, 1.0f);
glEnd();
- glPopMatrix();
+ gpuPopMatrix();
glMatrixMode(GL_PROJECTION);
- glPopMatrix();
+ gpuPopMatrix();
glMatrixMode(GL_MODELVIEW);
}