diff options
author | Mike Erwin <significant.bit@gmail.com> | 2017-03-21 23:08:14 +0300 |
---|---|---|
committer | Mike Erwin <significant.bit@gmail.com> | 2017-03-21 23:11:55 +0300 |
commit | 3bd831d1d61634e533227bccc04a46574289b774 (patch) | |
tree | d13653a64c6a9e514653d08ada6b642b79281e6d /source/blender/editors/space_clip | |
parent | 7870bde275a23b78198dc9d943e8dfe7a05a8b01 (diff) |
OpenGL: convert to new matrix API (part 4)
Part of T49450, fixes a Push/Pop mismatch from part yesterday's 3.
Diffstat (limited to 'source/blender/editors/space_clip')
-rw-r--r-- | source/blender/editors/space_clip/clip_utils.c | 7 | ||||
-rw-r--r-- | source/blender/editors/space_clip/space_clip.c | 14 |
2 files changed, 11 insertions, 10 deletions
diff --git a/source/blender/editors/space_clip/clip_utils.c b/source/blender/editors/space_clip/clip_utils.c index 560cf1f905a..1cddacc0fc6 100644 --- a/source/blender/editors/space_clip/clip_utils.c +++ b/source/blender/editors/space_clip/clip_utils.c @@ -44,6 +44,7 @@ #include "BKE_depsgraph.h" #include "GPU_immediate.h" +#include "GPU_matrix.h" #include "WM_api.h" #include "WM_types.h" @@ -263,13 +264,13 @@ void clip_draw_cfra(SpaceClip *sc, ARegion *ar, Scene *scene) /* because the frame number text is subject to the same scaling as the contents of the view */ float xscale, yscale; UI_view2d_scale_get(v2d, &xscale, &yscale); - glPushMatrix(); - glScalef(1.0f / xscale, 1.0f, 1.0f); + gpuPushMatrix(); + gpuScale2f(1.0f / xscale, 1.0f); ED_region_cache_draw_curfra_label(sc->user.framenr, (float)sc->user.framenr * xscale, 18); /* restore view transform */ - glPopMatrix(); + gpuPopMatrix(); } void clip_draw_sfra_efra(View2D *v2d, Scene *scene) diff --git a/source/blender/editors/space_clip/space_clip.c b/source/blender/editors/space_clip/space_clip.c index 05e69968e35..9f35fff5e78 100644 --- a/source/blender/editors/space_clip/space_clip.c +++ b/source/blender/editors/space_clip/space_clip.c @@ -60,7 +60,7 @@ #include "IMB_imbuf.h" -#include "BIF_gl.h" +#include "GPU_matrix.h" #include "WM_api.h" #include "WM_types.h" @@ -1213,13 +1213,13 @@ static void clip_main_region_draw(const bContext *C, ARegion *ar) show_cursor |= sc->around == V3D_AROUND_CURSOR; if (show_cursor) { - glPushMatrix(); - glTranslatef(x, y, 0); - glScalef(zoomx, zoomy, 0); - glMultMatrixf(sc->stabmat); - glScalef(width, height, 0); + gpuPushMatrix(); + gpuTranslate2f(x, y); + gpuScale2f(zoomx, zoomy); + gpuMultMatrix3D(sc->stabmat); /* XXX make this a 2D matrix */ + gpuScale2f(width, height); ED_image_draw_cursor(ar, sc->cursor); - glPopMatrix(); + gpuPopMatrix(); } clip_draw_cache_and_notes(C, sc, ar); |