diff options
author | Campbell Barton <ideasman42@gmail.com> | 2018-07-15 16:27:15 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2018-07-15 16:34:13 +0300 |
commit | 57ab7daa2aee436b0b0acfa00b2e2b1d28b55b2c (patch) | |
tree | 377218e81452e4e0d3f8ca3cf3c3ac5148f237b8 /source/blender/blenfont/intern | |
parent | b457cae397054a1be4e60f3007995f97c198b2b6 (diff) |
GPU_matrix: use Blender's naming conventions
Thanks to @sergey for review
Diffstat (limited to 'source/blender/blenfont/intern')
-rw-r--r-- | source/blender/blenfont/intern/blf.c | 12 | ||||
-rw-r--r-- | source/blender/blenfont/intern/blf_font.c | 8 |
2 files changed, 10 insertions, 10 deletions
diff --git a/source/blender/blenfont/intern/blf.c b/source/blender/blenfont/intern/blf.c index 5dd692d3855..b0e0cdac407 100644 --- a/source/blender/blenfont/intern/blf.c +++ b/source/blender/blenfont/intern/blf.c @@ -594,24 +594,24 @@ static void blf_draw_gl__start(FontBLF *font) if ((font->flags & (BLF_ROTATION | BLF_MATRIX | BLF_ASPECT)) == 0) return; /* glyphs will be translated individually and batched. */ - gpuPushMatrix(); + GPU_matrix_push(); if (font->flags & BLF_MATRIX) - gpuMultMatrix(font->m); + GPU_matrix_mul(font->m); - gpuTranslate3fv(font->pos); + GPU_matrix_translate_3fv(font->pos); if (font->flags & BLF_ASPECT) - gpuScale3fv(font->aspect); + GPU_matrix_scale_3fv(font->aspect); if (font->flags & BLF_ROTATION) - gpuRotate2D(RAD2DEG(font->angle)); + GPU_matrix_rotate_2d(RAD2DEG(font->angle)); } static void blf_draw_gl__end(FontBLF *font) { if ((font->flags & (BLF_ROTATION | BLF_MATRIX | BLF_ASPECT)) != 0) - gpuPopMatrix(); + GPU_matrix_pop(); } void BLF_draw_ex( diff --git a/source/blender/blenfont/intern/blf_font.c b/source/blender/blenfont/intern/blf_font.c index b3ab36f7bcc..3f4c430ee4b 100644 --- a/source/blender/blenfont/intern/blf_font.c +++ b/source/blender/blenfont/intern/blf_font.c @@ -142,15 +142,15 @@ void blf_batch_draw_begin(FontBLF *font) if (g_batch.active) { float gpumat[4][4]; - gpuGetModelViewMatrix(gpumat); + GPU_matrix_model_view_get(gpumat); bool mat_changed = (memcmp(gpumat, g_batch.mat, sizeof(g_batch.mat)) != 0); if (mat_changed) { /* Modelviewmat is no longer the same. * Flush cache but with the previous mat. */ - gpuPushMatrix(); - gpuLoadMatrix(g_batch.mat); + GPU_matrix_push(); + GPU_matrix_set(g_batch.mat); } /* flush cache if config is not the same. */ @@ -165,7 +165,7 @@ void blf_batch_draw_begin(FontBLF *font) } if (mat_changed) { - gpuPopMatrix(); + GPU_matrix_pop(); /* Save for next memcmp. */ memcpy(g_batch.mat, gpumat, sizeof(g_batch.mat)); } |