Revision: 44015
http://projects.blender.org/scm/viewvc.php?view=rev&root=bf-blender&revision=44015
Author: dfelinto
Date: 2012-02-10 07:52:21 +0000 (Fri, 10 Feb 2012)
Log Message:
-----------
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.
Modified Paths:
--------------
trunk/blender/source/gameengine/Ketsji/KX_FontObject.cpp
Modified: trunk/blender/source/gameengine/Ketsji/KX_FontObject.cpp
===================================================================
--- trunk/blender/source/gameengine/Ketsji/KX_FontObject.cpp 2012-02-10
06:50:16 UTC (rev 44014)
+++ trunk/blender/source/gameengine/Ketsji/KX_FontObject.cpp 2012-02-10
07:52:21 UTC (rev 44015)
@@ -173,10 +173,10 @@
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];
_______________________________________________
Bf-blender-cvs mailing list
[email protected]
http://lists.blender.org/mailman/listinfo/bf-blender-cvs