From 09ad6842499f638ecd944714c0a82ba8deebb073 Mon Sep 17 00:00:00 2001 From: Mike Erwin Date: Thu, 23 Mar 2017 01:45:46 -0400 Subject: cleanup use of GPU matrix API Take advantage of 2D functions, rotation about the X Y or Z axis, uniform scale factors. We no longer need to call gpuMatrixBegin_legacy() before using the new API locally in functions. related to T49450 --- source/blender/blenfont/intern/blf.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'source/blender/blenfont') diff --git a/source/blender/blenfont/intern/blf.c b/source/blender/blenfont/intern/blf.c index 17b353d48c2..d4bd1502417 100644 --- a/source/blender/blenfont/intern/blf.c +++ b/source/blender/blenfont/intern/blf.c @@ -552,7 +552,7 @@ static void blf_draw_gl__start(FontBLF *font) glEnable(GL_BLEND); glBlendFunc(GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA); - gpuMatrixBegin3D_legacy(); + gpuPushMatrix(); if (font->flags & BLF_MATRIX) gpuMultMatrix3D(font->m); @@ -563,7 +563,7 @@ static void blf_draw_gl__start(FontBLF *font) gpuScale3fv(font->aspect); if (font->flags & BLF_ROTATION) /* radians -> degrees */ - gpuRotateAxis(RAD2DEG(font->angle), 'Z'); + gpuRotateAxis(RAD2DEG(font->angle), 'Z'); /* TODO: use gpuRotate2D here? */ #ifndef BLF_STANDALONE VertexFormat *format = immVertexFormat(); @@ -584,7 +584,7 @@ static void blf_draw_gl__start(FontBLF *font) static void blf_draw_gl__end(void) { - gpuMatrixEnd(); + gpuPopMatrix(); #ifndef BLF_STANDALONE immUnbindProgram(); -- cgit v1.2.3