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:
authorDalai Felinto <dfelinto@gmail.com>2012-02-10 11:52:21 +0400
committerDalai Felinto <dfelinto@gmail.com>2012-02-10 11:52:21 +0400
commit6a598148a7f42d7ef6496ed1b8f63178eb7ebaba (patch)
treecccb962a21e2e99ee6d0dc137700f08a139b7b3e /source/gameengine
parent17dadffd6688d44276ed59437e0344659d096c8f (diff)
bge font objects: fix for difference in size when object has a parent
for after 2.62 I would like to try if using doubles would help to increase the precision here. Also now that the mipmap patch is reverted we may want to look at this problem from a different perspective. RES could be calculated taking the object size in relation to the camera (i.e. size and distance, ignoring rotation). That may solve both problems of wrong resolution and lack of smoothness. For the time being users still need to use object.resolution to fine tune the rendered text.
Diffstat (limited to 'source/gameengine')
-rw-r--r--source/gameengine/Ketsji/KX_FontObject.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/source/gameengine/Ketsji/KX_FontObject.cpp b/source/gameengine/Ketsji/KX_FontObject.cpp
index 8cce9471587..519ff97a2a2 100644
--- a/source/gameengine/Ketsji/KX_FontObject.cpp
+++ b/source/gameengine/Ketsji/KX_FontObject.cpp
@@ -173,10 +173,10 @@ void KX_FontObject::DrawText()
this->GetObjectColor().getValue(m_color);
/* HARDCODED MULTIPLICATION FACTOR - this will affect the render resolution directly */
- float RES = BGE_FONT_RES * m_resolution;
+ const float RES = BGE_FONT_RES * m_resolution;
- float size = m_fsize * m_object->size[0] * RES;
- float aspect = 1.f / (m_object->size[0] * RES);
+ const float size = m_fsize * this->NodeGetWorldScaling()[0] * RES;
+ const float aspect = m_fsize / size;
/* Get a working copy of the OpenGLMatrix to use */
double mat[16];