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
path: root/source
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
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')
-rw-r--r--source/blender/blenfont/intern/blf.c2
-rw-r--r--source/blender/draw/intern/draw_manager.c9
-rw-r--r--source/blender/draw/intern/draw_view.c4
-rw-r--r--source/blender/editors/interface/view2d.c5
-rw-r--r--source/blender/editors/mesh/editmesh_knife.c8
-rw-r--r--source/blender/editors/screen/glutil.c6
-rw-r--r--source/blender/editors/sculpt_paint/paint_utils.c7
-rw-r--r--source/blender/editors/space_image/image_draw.c2
-rw-r--r--source/blender/editors/space_node/drawnode.c10
-rw-r--r--source/blender/editors/space_sequencer/sequencer_draw.c13
-rw-r--r--source/blender/editors/space_view3d/drawanimviz.c9
-rw-r--r--source/blender/editors/space_view3d/drawmesh.c14
-rw-r--r--source/blender/editors/space_view3d/drawsimdebug.c9
-rw-r--r--source/blender/editors/space_view3d/view3d_select.c6
-rw-r--r--source/blender/editors/space_view3d/view3d_view.c8
-rw-r--r--source/blender/editors/transform/transform_generics.c12
-rw-r--r--source/blender/windowmanager/intern/wm_subwindow.c12
17 files changed, 68 insertions, 68 deletions
diff --git a/source/blender/blenfont/intern/blf.c b/source/blender/blenfont/intern/blf.c
index ab7c831f95c..17b353d48c2 100644
--- a/source/blender/blenfont/intern/blf.c
+++ b/source/blender/blenfont/intern/blf.c
@@ -555,7 +555,7 @@ static void blf_draw_gl__start(FontBLF *font)
gpuMatrixBegin3D_legacy();
if (font->flags & BLF_MATRIX)
- gpuMultMatrix3D((float (*)[4])font->m);
+ gpuMultMatrix3D(font->m);
gpuTranslate3fv(font->pos);
diff --git a/source/blender/draw/intern/draw_manager.c b/source/blender/draw/intern/draw_manager.c
index 6b7fe00dba1..ad4678d8ee1 100644
--- a/source/blender/draw/intern/draw_manager.c
+++ b/source/blender/draw/intern/draw_manager.c
@@ -51,6 +51,7 @@
#include "GPU_texture.h"
#include "GPU_uniformbuffer.h"
#include "GPU_viewport.h"
+#include "GPU_matrix.h"
#include "RE_engine.h"
@@ -1067,9 +1068,9 @@ void DRW_draw_callbacks_pre_scene(void)
/* This is temporary
* waiting for the full matrix switch */
glMatrixMode(GL_PROJECTION);
- glLoadMatrixf((float *)rv3d->winmat);
+ gpuLoadMatrix3D(rv3d->winmat);
glMatrixMode(GL_MODELVIEW);
- glLoadMatrixf((float *)rv3d->viewmat);
+ gpuLoadMatrix3D(rv3d->viewmat);
ED_region_draw_cb_draw(DST.context, ar, REGION_DRAW_PRE_VIEW);
}
@@ -1082,9 +1083,9 @@ void DRW_draw_callbacks_post_scene(void)
/* This is temporary
* waiting for the full matrix switch */
glMatrixMode(GL_PROJECTION);
- glLoadMatrixf((float *)rv3d->winmat);
+ gpuLoadMatrix3D(rv3d->winmat);
glMatrixMode(GL_MODELVIEW);
- glLoadMatrixf((float *)rv3d->viewmat);
+ gpuLoadMatrix3D(rv3d->viewmat);
ED_region_draw_cb_draw(DST.context, ar, REGION_DRAW_POST_VIEW);
}
diff --git a/source/blender/draw/intern/draw_view.c b/source/blender/draw/intern/draw_view.c
index 747cc84a9cd..e0a19cec7ad 100644
--- a/source/blender/draw/intern/draw_view.c
+++ b/source/blender/draw/intern/draw_view.c
@@ -532,9 +532,9 @@ void DRW_draw_grid(void)
drawgrid(&scene->unit, ar, v3d, &grid_unit);
glMatrixMode(GL_PROJECTION);
- glLoadMatrixf((float *)rv3d->winmat);
+ gpuLoadMatrix3D(rv3d->winmat);
glMatrixMode(GL_MODELVIEW);
- glLoadMatrixf((float *)rv3d->viewmat);
+ gpuLoadMatrix3D(rv3d->viewmat);
}
else {
glDepthMask(GL_TRUE);
diff --git a/source/blender/editors/interface/view2d.c b/source/blender/editors/interface/view2d.c
index 5c2d4cafd84..5a9a4ef49eb 100644
--- a/source/blender/editors/interface/view2d.c
+++ b/source/blender/editors/interface/view2d.c
@@ -50,11 +50,10 @@
#include "BKE_global.h"
#include "GPU_immediate.h"
+#include "GPU_matrix.h"
#include "WM_api.h"
-#include "BIF_gl.h"
-
#include "BLF_api.h"
#include "ED_screen.h"
@@ -1139,7 +1138,7 @@ void UI_view2d_view_restore(const bContext *C)
int height = BLI_rcti_size_y(&ar->winrct) + 1;
wmOrtho2(0.0f, (float)width, 0.0f, (float)height);
- glLoadIdentity();
+ gpuLoadIdentity();
// ED_region_pixelspace(CTX_wm_region(C));
}
diff --git a/source/blender/editors/mesh/editmesh_knife.c b/source/blender/editors/mesh/editmesh_knife.c
index f320943d68a..a7fa5eb8138 100644
--- a/source/blender/editors/mesh/editmesh_knife.c
+++ b/source/blender/editors/mesh/editmesh_knife.c
@@ -54,10 +54,10 @@
#include "BKE_editmesh_bvh.h"
#include "BKE_report.h"
-#include "BIF_gl.h"
#include "BIF_glutil.h" /* for paint cursor */
#include "GPU_immediate.h"
+#include "GPU_matrix.h"
#include "ED_screen.h"
#include "ED_space_api.h"
@@ -1043,8 +1043,8 @@ static void knifetool_draw(const bContext *C, ARegion *UNUSED(ar), void *arg)
glPolygonOffset(1.0f, 1.0f);
- glPushMatrix();
- glMultMatrixf(kcd->ob->obmat);
+ gpuPushMatrix();
+ gpuMultMatrix3D(kcd->ob->obmat);
unsigned pos = add_attrib(immVertexFormat(), "pos", GL_FLOAT, 3, KEEP_FLOAT);
@@ -1191,7 +1191,7 @@ static void knifetool_draw(const bContext *C, ARegion *UNUSED(ar), void *arg)
immUnbindProgram();
- glPopMatrix();
+ gpuPopMatrix();
if (v3d->zbuf) glEnable(GL_DEPTH_TEST);
}
diff --git a/source/blender/editors/screen/glutil.c b/source/blender/editors/screen/glutil.c
index f077535f51b..0834f05706e 100644
--- a/source/blender/editors/screen/glutil.c
+++ b/source/blender/editors/screen/glutil.c
@@ -623,8 +623,8 @@ gla2DDrawInfo *glaBegin2DDraw(rcti *screen_rect, rctf *world_rect)
glGetIntegerv(GL_VIEWPORT, (GLint *)di->orig_vp);
glGetIntegerv(GL_SCISSOR_BOX, (GLint *)di->orig_sc);
- glGetFloatv(GL_PROJECTION_MATRIX, (GLfloat *)di->orig_projmat);
- glGetFloatv(GL_MODELVIEW_MATRIX, (GLfloat *)di->orig_viewmat);
+ gpuGetProjectionMatrix3D(di->orig_projmat);
+ gpuGetModelViewMatrix3D(di->orig_viewmat);
di->screen_rect = *screen_rect;
if (world_rect) {
@@ -703,7 +703,7 @@ void bglPolygonOffset(float viewdist, float dist)
/* hack below is to mimic polygon offset */
glMatrixMode(GL_PROJECTION);
- glGetFloatv(GL_PROJECTION_MATRIX, (float *)winmat);
+ gpuGetProjectionMatrix3D(winmat);
/* dist is from camera to center point */
diff --git a/source/blender/editors/sculpt_paint/paint_utils.c b/source/blender/editors/sculpt_paint/paint_utils.c
index 756536f3db2..23c0f680a64 100644
--- a/source/blender/editors/sculpt_paint/paint_utils.c
+++ b/source/blender/editors/sculpt_paint/paint_utils.c
@@ -59,8 +59,7 @@
#include "RNA_access.h"
#include "RNA_define.h"
-#include "BIF_gl.h"
-#include "BIF_glutil.h"
+#include "GPU_matrix.h"
#include "IMB_colormanagement.h"
#include "IMB_imbuf_types.h"
@@ -285,8 +284,8 @@ static void imapaint_pick_uv(Scene *scene, Object *ob, unsigned int faceindex, c
/* get the needed opengl matrices */
glGetIntegerv(GL_VIEWPORT, view);
- glGetFloatv(GL_MODELVIEW_MATRIX, (float *)matrix);
- glGetFloatv(GL_PROJECTION_MATRIX, (float *)proj);
+ gpuGetModelViewMatrix3D(matrix);
+ gpuGetProjectionMatrix3D(proj);
view[0] = view[1] = 0;
mul_m4_m4m4(matrix, matrix, ob->obmat);
mul_m4_m4m4(matrix, proj, matrix);
diff --git a/source/blender/editors/space_image/image_draw.c b/source/blender/editors/space_image/image_draw.c
index 940d6f07018..d5258869968 100644
--- a/source/blender/editors/space_image/image_draw.c
+++ b/source/blender/editors/space_image/image_draw.c
@@ -852,7 +852,7 @@ void draw_image_main(const bContext *C, ARegion *ar)
calc_image_view(sima, 'f');
myortho2(G.v2d->cur.xmin, G.v2d->cur.xmax, G.v2d->cur.ymin, G.v2d->cur.ymax);
glRectf(0.0f, 0.0f, 1.0f, 1.0f);
- glLoadIdentity();
+ gpuLoadIdentity();
}
}
#endif
diff --git a/source/blender/editors/space_node/drawnode.c b/source/blender/editors/space_node/drawnode.c
index 6796802dca9..51b82c9f421 100644
--- a/source/blender/editors/space_node/drawnode.c
+++ b/source/blender/editors/space_node/drawnode.c
@@ -50,11 +50,11 @@
#include "BLF_api.h"
#include "BLT_translation.h"
-#include "BIF_gl.h"
#include "BIF_glutil.h"
#include "GPU_draw.h"
#include "GPU_immediate.h"
+#include "GPU_matrix.h"
#include "RNA_access.h"
#include "RNA_define.h"
@@ -3198,9 +3198,9 @@ void draw_nodespace_back_pix(const bContext *C, ARegion *ar, SpaceNode *snode, b
float x, y;
glMatrixMode(GL_PROJECTION);
- glPushMatrix();
+ gpuPushMatrix();
glMatrixMode(GL_MODELVIEW);
- glPushMatrix();
+ gpuPushMatrix();
/* somehow the offset has to be calculated inverse */
@@ -3286,9 +3286,9 @@ void draw_nodespace_back_pix(const bContext *C, ARegion *ar, SpaceNode *snode, b
}
glMatrixMode(GL_PROJECTION);
- glPopMatrix();
+ gpuPopMatrix();
glMatrixMode(GL_MODELVIEW);
- glPopMatrix();
+ gpuPopMatrix();
}
BKE_image_release_ibuf(ima, ibuf, lock);
diff --git a/source/blender/editors/space_sequencer/sequencer_draw.c b/source/blender/editors/space_sequencer/sequencer_draw.c
index 3da0150a75b..36aa3358b18 100644
--- a/source/blender/editors/space_sequencer/sequencer_draw.c
+++ b/source/blender/editors/space_sequencer/sequencer_draw.c
@@ -58,6 +58,7 @@
#include "BIF_glutil.h"
#include "GPU_immediate.h"
+#include "GPU_matrix.h"
#include "ED_anim_api.h"
#include "ED_gpencil.h"
@@ -1287,11 +1288,11 @@ void draw_image_seq(const bContext *C, Scene *scene, ARegion *ar, SpaceSeq *sseq
if (draw_backdrop) {
glMatrixMode(GL_PROJECTION);
- glPushMatrix();
- glLoadIdentity();
+ gpuPushMatrix();
+ gpuLoadIdentity();
glMatrixMode(GL_MODELVIEW);
- glPushMatrix();
- glLoadIdentity();
+ gpuPushMatrix();
+ gpuLoadIdentity();
}
glGenTextures(1, (GLuint *)&texid);
@@ -1420,9 +1421,9 @@ void draw_image_seq(const bContext *C, Scene *scene, ARegion *ar, SpaceSeq *sseq
}
if (draw_backdrop) {
- glPopMatrix();
+ gpuPopMatrix();
glMatrixMode(GL_PROJECTION);
- glPopMatrix();
+ gpuPopMatrix();
glMatrixMode(GL_MODELVIEW);
return;
}
diff --git a/source/blender/editors/space_view3d/drawanimviz.c b/source/blender/editors/space_view3d/drawanimviz.c
index 505ed1fdd3a..7ab2b4ec3a4 100644
--- a/source/blender/editors/space_view3d/drawanimviz.c
+++ b/source/blender/editors/space_view3d/drawanimviz.c
@@ -49,9 +49,8 @@
#include "BKE_animsys.h"
#include "BKE_action.h"
-#include "BIF_gl.h"
-
#include "GPU_immediate.h"
+#include "GPU_matrix.h"
#include "ED_keyframes_draw.h"
@@ -73,8 +72,8 @@ void draw_motion_paths_init(View3D *v3d, ARegion *ar)
if (v3d->zbuf) glDisable(GL_DEPTH_TEST);
- glPushMatrix();
- glLoadMatrixf(rv3d->viewmat);
+ gpuPushMatrix();
+ gpuLoadMatrix3D(rv3d->viewmat);
}
/* set color
@@ -435,5 +434,5 @@ void draw_motion_path_instance(Scene *scene,
void draw_motion_paths_cleanup(View3D *v3d)
{
if (v3d->zbuf) glEnable(GL_DEPTH_TEST);
- glPopMatrix();
+ gpuPopMatrix();
}
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 */
diff --git a/source/blender/editors/space_view3d/drawsimdebug.c b/source/blender/editors/space_view3d/drawsimdebug.c
index e47adbea657..5984633112d 100644
--- a/source/blender/editors/space_view3d/drawsimdebug.c
+++ b/source/blender/editors/space_view3d/drawsimdebug.c
@@ -41,11 +41,10 @@
#include "BKE_effect.h"
#include "GPU_immediate.h"
+#include "GPU_matrix.h"
#include "view3d_intern.h"
-#include "BIF_gl.h"
-
static void draw_sim_debug_elements(SimDebugData *debug_data, float imat[4][4])
{
@@ -199,12 +198,12 @@ void draw_sim_debug_data(Scene *UNUSED(scene), View3D *v3d, ARegion *ar)
invert_m4_m4(imat, rv3d->viewmatob);
- glPushMatrix();
- glLoadMatrixf(rv3d->viewmat);
+ gpuPushMatrix();
+ gpuLoadMatrix3D(rv3d->viewmat);
view3d_cached_text_draw_begin();
draw_sim_debug_elements(_sim_debug_data, imat);
view3d_cached_text_draw_end(v3d, ar, false, NULL);
- glPopMatrix();
+ gpuPopMatrix();
}
diff --git a/source/blender/editors/space_view3d/view3d_select.c b/source/blender/editors/space_view3d/view3d_select.c
index 8eee7f6a632..76f8db1cec5 100644
--- a/source/blender/editors/space_view3d/view3d_select.c
+++ b/source/blender/editors/space_view3d/view3d_select.c
@@ -75,7 +75,6 @@
#include "BKE_utildefines.h"
-#include "BIF_gl.h"
#include "BIF_glutil.h"
#include "WM_api.h"
@@ -97,6 +96,7 @@
#include "UI_interface.h"
#include "GPU_draw.h"
+#include "GPU_matrix.h"
#include "view3d_intern.h" /* own include */
@@ -477,7 +477,7 @@ static void do_lasso_select_mesh(ViewContext *vc, const int mcords[][2], short m
/* for non zbuf projections, don't change the GL state */
ED_view3d_init_mats_rv3d(vc->obedit, vc->rv3d);
- glLoadMatrixf(vc->rv3d->viewmat);
+ gpuLoadMatrix3D(vc->rv3d->viewmat);
bbsel = EDBM_backbuf_border_mask_init(vc, mcords, moves, rect.xmin, rect.ymin, rect.xmax, rect.ymax);
if (ts->selectmode & SCE_SELECT_VERTEX) {
@@ -1849,7 +1849,7 @@ static int do_mesh_box_select(ViewContext *vc, rcti *rect, bool select, bool ext
/* for non zbuf projections, don't change the GL state */
ED_view3d_init_mats_rv3d(vc->obedit, vc->rv3d);
- glLoadMatrixf(vc->rv3d->viewmat);
+ gpuLoadMatrix3D(vc->rv3d->viewmat);
bbsel = EDBM_backbuf_border_init(vc, rect->xmin, rect->ymin, rect->xmax, rect->ymax);
if (ts->selectmode & SCE_SELECT_VERTEX) {
diff --git a/source/blender/editors/space_view3d/view3d_view.c b/source/blender/editors/space_view3d/view3d_view.c
index f2d25ddcbd6..05915b31322 100644
--- a/source/blender/editors/space_view3d/view3d_view.c
+++ b/source/blender/editors/space_view3d/view3d_view.c
@@ -51,10 +51,10 @@
#include "BKE_scene.h"
#include "BKE_screen.h"
-#include "BIF_gl.h"
#include "BIF_glutil.h"
#include "GPU_select.h"
+#include "GPU_matrix.h"
#include "WM_api.h"
#include "WM_types.h"
@@ -97,9 +97,9 @@ void view3d_region_operator_needs_opengl(wmWindow *win, ARegion *ar)
wmSubWindowSet(win, ar->swinid);
glMatrixMode(GL_PROJECTION);
- glLoadMatrixf(rv3d->winmat);
+ gpuLoadMatrix3D(rv3d->winmat);
glMatrixMode(GL_MODELVIEW);
- glLoadMatrixf(rv3d->viewmat);
+ gpuLoadMatrix3D(rv3d->viewmat);
}
}
@@ -936,7 +936,7 @@ void view3d_winmatrix_set(ARegion *ar, const View3D *v3d, const rcti *rect)
}
/* update matrix in 3d view region */
- glGetFloatv(GL_PROJECTION_MATRIX, (float *)rv3d->winmat);
+ gpuGetProjectionMatrix3D(rv3d->winmat);
}
static void obmat_to_viewmat(RegionView3D *rv3d, Object *ob)
diff --git a/source/blender/editors/transform/transform_generics.c b/source/blender/editors/transform/transform_generics.c
index 72148ea13b0..3ece7f40b92 100644
--- a/source/blender/editors/transform/transform_generics.c
+++ b/source/blender/editors/transform/transform_generics.c
@@ -63,6 +63,7 @@
#include "RNA_access.h"
#include "GPU_immediate.h"
+#include "GPU_matrix.h"
#include "BIK_api.h"
@@ -1033,11 +1034,10 @@ void drawLine(TransInfo *t, const float center[3], const float dir[3], char axis
if (t->spacetype == SPACE_VIEW3D) {
View3D *v3d = t->view;
- glPushMatrix();
-
- //if (t->obedit) glLoadMatrixf(t->obedit->obmat); // sets opengl viewing
-
-
+ gpuPushMatrix();
+
+ // if (t->obedit) gpuLoadMatrix3D(t->obedit->obmat); // sets opengl viewing
+
copy_v3_v3(v3, dir);
mul_v3_fl(v3, v3d->far);
@@ -1064,7 +1064,7 @@ void drawLine(TransInfo *t, const float center[3], const float dir[3], char axis
immUnbindProgram();
- glPopMatrix();
+ gpuPopMatrix();
}
}
diff --git a/source/blender/windowmanager/intern/wm_subwindow.c b/source/blender/windowmanager/intern/wm_subwindow.c
index c401a11f74d..489f0b8013f 100644
--- a/source/blender/windowmanager/intern/wm_subwindow.c
+++ b/source/blender/windowmanager/intern/wm_subwindow.c
@@ -47,6 +47,8 @@
#include "BIF_gl.h"
+#include "GPU_matrix.h"
+
#include "WM_api.h"
#include "wm_subwindow.h"
@@ -147,7 +149,7 @@ static void wm_swin_matrix_get(wmWindow *win, wmSubWindow *swin, float mat[4][4]
orthographic_m4(mat, -GLA_PIXEL_OFS, (float)width - GLA_PIXEL_OFS, -GLA_PIXEL_OFS, (float)height - GLA_PIXEL_OFS, -100, 100);
}
else {
- glGetFloatv(GL_PROJECTION_MATRIX, (float *)mat);
+ gpuGetProjectionMatrix3D(mat);
}
}
void wm_subwindow_matrix_get(wmWindow *win, int swinid, float mat[4][4])
@@ -213,7 +215,7 @@ int wm_subwindow_open(wmWindow *win, const rcti *winrct, bool activate)
/* extra service */
wm_swin_size_get(swin, &width, &height);
wmOrtho2_pixelspace(width, height);
- glLoadIdentity();
+ gpuLoadIdentity();
}
return swin->swinid;
@@ -319,7 +321,7 @@ void wmSubWindowScissorSet(wmWindow *win, int swinid, const rcti *srct, bool src
glScissor(_curswin->winrct.xmin, _curswin->winrct.ymin, width, height);
wmOrtho2_pixelspace(width, height);
- glLoadIdentity();
+ gpuLoadIdentity();
glFlush();
}
@@ -333,7 +335,7 @@ void wmSubWindowSet(wmWindow *win, int swinid)
void wmFrustum(float x1, float x2, float y1, float y2, float n, float f)
{
glMatrixMode(GL_PROJECTION);
- glLoadIdentity();
+ gpuLoadIdentity();
glFrustum(x1, x2, y1, y2, n, f);
glMatrixMode(GL_MODELVIEW);
}
@@ -341,7 +343,7 @@ void wmFrustum(float x1, float x2, float y1, float y2, float n, float f)
void wmOrtho(float x1, float x2, float y1, float y2, float n, float f)
{
glMatrixMode(GL_PROJECTION);
- glLoadIdentity();
+ gpuLoadIdentity();
glOrtho(x1, x2, y1, y2, n, f);