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-22 00:49:21 +0300
committerMike Erwin <significant.bit@gmail.com>2017-03-22 00:49:21 +0300
commit6d2aca5a96efd8ac61eec633c43a41e641379a68 (patch)
treede0d38249d8b439bf360ceb8d77f8112d4047f9e /source/blender/editors/space_view3d/drawmesh.c
parent7aad5cf573a964753b37573c5a2ea12af5d5952a (diff)
OpenGL: convert to new matrix API (part 5)
Pretty sure source/blender is now finished, with all legacy matrix calls confined to gpu_matrix.c. This was the easy part, but doing it first makes the next part much easier. TODO and XXX notes describe what is left. glMatrixMode is still in place, since the new API does not share this concept of modes. Similar for glOrtho and glFrustum which I'll tackle very soon. Part of T49450
Diffstat (limited to 'source/blender/editors/space_view3d/drawmesh.c')
-rw-r--r--source/blender/editors/space_view3d/drawmesh.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/source/blender/editors/space_view3d/drawmesh.c b/source/blender/editors/space_view3d/drawmesh.c
index 8cd03a2aacc..102a754e6de 100644
--- a/source/blender/editors/space_view3d/drawmesh.c
+++ b/source/blender/editors/space_view3d/drawmesh.c
@@ -55,7 +55,6 @@
#include "BKE_editmesh.h"
#include "BKE_scene.h"
-#include "BIF_gl.h"
#include "BIF_glutil.h"
#include "UI_resources.h"
@@ -64,6 +63,7 @@
#include "GPU_material.h"
#include "GPU_basic_shader.h"
#include "GPU_shader.h"
+#include "GPU_matrix.h"
#include "RE_engine.h"
@@ -547,10 +547,10 @@ static void draw_textured_end(void)
* of and restored the light settings it changed.
* - zr
*/
- glPushMatrix();
- glLoadIdentity();
+ gpuPushMatrix();
+ gpuLoadIdentity();
GPU_default_lights();
- glPopMatrix();
+ gpuPopMatrix();
}
static DMDrawOption draw_tface__set_draw_legacy(MTexPoly *mtexpoly, const bool has_mcol, int matnr)
@@ -1104,7 +1104,7 @@ static void tex_mat_set_texture_cb(void *userData, int mat_nr, void *attribs)
glBindTexture(GL_TEXTURE_2D, ima->bindcode[TEXTARGET_TEXTURE_2D]);
glMatrixMode(GL_TEXTURE);
- glLoadMatrixf(texbase->tex_mapping.mat);
+ gpuLoadMatrix3D(texbase->tex_mapping.mat);
glMatrixMode(GL_MODELVIEW);
/* use active UV texture layer */
@@ -1140,7 +1140,7 @@ static void tex_mat_set_texture_cb(void *userData, int mat_nr, void *attribs)
}
else {
glMatrixMode(GL_TEXTURE);
- glLoadIdentity();
+ gpuLoadIdentity();
glMatrixMode(GL_MODELVIEW);
/* enable solid material */
@@ -1243,7 +1243,7 @@ void draw_mesh_textured(Scene *scene, SceneLayer *sl, View3D *v3d, RegionView3D
glFrontFace(GL_CCW);
glMatrixMode(GL_TEXTURE);
- glLoadIdentity();
+ gpuLoadIdentity();
glMatrixMode(GL_MODELVIEW);
/* faceselect mode drawing over textured mesh */