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_image/image_draw.c | |
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_image/image_draw.c')
-rw-r--r-- | source/blender/editors/space_image/image_draw.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/source/blender/editors/space_image/image_draw.c b/source/blender/editors/space_image/image_draw.c index da1f2ad9741..940d6f07018 100644 --- a/source/blender/editors/space_image/image_draw.c +++ b/source/blender/editors/space_image/image_draw.c @@ -63,6 +63,7 @@ #include "BIF_glutil.h" #include "GPU_immediate.h" +#include "GPU_matrix.h" #include "BLF_api.h" @@ -114,15 +115,14 @@ static void draw_render_info(const bContext *C, int x, y; UI_view2d_view_to_region(&ar->v2d, 0.0f, 0.0f, &x, &y); - glPushMatrix(); - glTranslatef(x, y, 0.0f); - glScalef(zoomx, zoomy, 1.0f); + gpuPushMatrix(); + gpuTranslate2f(x, y); + gpuScale2f(zoomx, zoomy); if (rd->mode & R_BORDER) { /* TODO: round or floor instead of casting to int */ - glTranslatef((int)(-rd->border.xmin * rd->xsch * rd->size * 0.01f), - (int)(-rd->border.ymin * rd->ysch * rd->size * 0.01f), - 0.0f); + gpuTranslate2f((int)(-rd->border.xmin * rd->xsch * rd->size * 0.01f), + (int)(-rd->border.ymin * rd->ysch * rd->size * 0.01f)); } unsigned int pos = add_attrib(immVertexFormat(), "pos", COMP_F32, 2, KEEP_FLOAT); @@ -142,7 +142,7 @@ static void draw_render_info(const bContext *C, MEM_freeN(tiles); } - glPopMatrix(); + gpuPopMatrix(); } } } |