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:
authorAlex Fraser <alex@phatcore.com>2012-02-04 05:51:59 +0400
committerAlex Fraser <alex@phatcore.com>2012-02-04 05:51:59 +0400
commita05fdb837b89f2fba04587e99d0eecaa9cf174c3 (patch)
tree3739d95c3a2b10d1ae7cc8a0723ba3cb19924e0a /source/gameengine/GamePlayer
parentdc97e07134c48aacf5e3de4436d70e7b71fbecaa (diff)
Fix for aliased fonts in the game engine.
- Mipmaps are generated in BLF when drawing text in-game. In that case, padding around each glyph is increased to prevent bleeding. - Texture filtering is turned on for in-game text. - All glyphs are now "twisted": the leading edge is brought a small distance forward, to prevent z-fighting in overlapping (kerned) glyphs. This happens both in the game engine and the rest of the UI, but should have no effect in the UI due to Z-compression in the clipping matrix. Reviewed and approved by bdiego; see patch [#29882] in the tracker. Tested by dfelinto.
Diffstat (limited to 'source/gameengine/GamePlayer')
-rw-r--r--source/gameengine/GamePlayer/common/GPC_RenderTools.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/source/gameengine/GamePlayer/common/GPC_RenderTools.cpp b/source/gameengine/GamePlayer/common/GPC_RenderTools.cpp
index ffa2cb38b87..b06a9783b50 100644
--- a/source/gameengine/GamePlayer/common/GPC_RenderTools.cpp
+++ b/source/gameengine/GamePlayer/common/GPC_RenderTools.cpp
@@ -294,8 +294,8 @@ void GPC_RenderTools::RenderText3D( int fontid,
/* the actual drawing */
glColor3fv(color);
+ BLF_enable(fontid, BLF_MATRIX|BLF_ASPECT|BLF_TEXFILTER);
/* multiply the text matrix by the object matrix */
- BLF_enable(fontid, BLF_MATRIX|BLF_ASPECT);
BLF_matrix(fontid, mat);
/* aspect is the inverse scale that allows you to increase */
@@ -307,7 +307,7 @@ void GPC_RenderTools::RenderText3D( int fontid,
BLF_position(fontid, 0, 0, 0);
BLF_draw(fontid, text, 65535);
- BLF_disable(fontid, BLF_MATRIX|BLF_ASPECT);
+ BLF_disable(fontid, BLF_MATRIX|BLF_ASPECT|BLF_TEXFILTER);
glEnable(GL_DEPTH_TEST);
}