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>2016-09-17 14:54:30 +0300
committerMike Erwin <significant.bit@gmail.com>2016-09-17 14:54:30 +0300
commite21853abb9fee9936f0a2d257a5b110535f0937e (patch)
tree332bee4889f0bc6b1fd07291614550347a9f4f77 /source/blender/blenfont
parent1b1275f0db85101345def817fee486beebaa6b9a (diff)
OpenGL: streamline font rendering
Ignore texture matrix in the shader, stop messing with texture matrix in BLF code. Use linear screen-space interpolation instead of perspective. Avoid redundant call to glMatrixMode.
Diffstat (limited to 'source/blender/blenfont')
-rw-r--r--source/blender/blenfont/intern/blf.c11
1 files changed, 2 insertions, 9 deletions
diff --git a/source/blender/blenfont/intern/blf.c b/source/blender/blenfont/intern/blf.c
index ec1f3d1f1f1..d7fcb2c727f 100644
--- a/source/blender/blenfont/intern/blf.c
+++ b/source/blender/blenfont/intern/blf.c
@@ -507,11 +507,8 @@ static void blf_draw_gl__start(FontBLF *font, GLint *mode)
/* Save the current matrix mode. */
glGetIntegerv(GL_MATRIX_MODE, mode);
- glMatrixMode(GL_TEXTURE);
- glPushMatrix();
- glLoadIdentity();
-
- glMatrixMode(GL_MODELVIEW);
+ if (*mode != GL_MODELVIEW)
+ glMatrixMode(GL_MODELVIEW);
glPushMatrix();
if (font->flags & BLF_MATRIX)
@@ -534,10 +531,6 @@ static void blf_draw_gl__start(FontBLF *font, GLint *mode)
static void blf_draw_gl__end(GLint mode)
{
- glMatrixMode(GL_TEXTURE);
- glPopMatrix();
-
- glMatrixMode(GL_MODELVIEW);
glPopMatrix();
if (mode != GL_MODELVIEW)