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-23 08:45:46 +0300
committerMike Erwin <significant.bit@gmail.com>2017-03-23 08:46:14 +0300
commit09ad6842499f638ecd944714c0a82ba8deebb073 (patch)
treef3f3f3be2571d530497850b9196e0c23ff3e8093 /source/blender/blenfont
parentc2366009c06ad7bdda29d182f8f3b4550cc0e123 (diff)
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
Diffstat (limited to 'source/blender/blenfont')
-rw-r--r--source/blender/blenfont/intern/blf.c6
1 files changed, 3 insertions, 3 deletions
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();