diff options
author | Mitchell Stokes <mogurijin@gmail.com> | 2013-06-20 07:50:02 +0400 |
---|---|---|
committer | Mitchell Stokes <mogurijin@gmail.com> | 2013-06-20 07:50:02 +0400 |
commit | 1e64732d5264edef5af455febdf8567fc3472a05 (patch) | |
tree | 8b4d5a8862bf8458a4d5188ac41d32c14164c1ca /source/gameengine/Ketsji/KX_Scene.cpp | |
parent | 4eded6dbdcb3c0d451a0d5d5f0147be73b10f8af (diff) |
BGE: Fix for [#34781] "bge.texture.ImageRender does not show Font object" reported by Monster.
This fix is mostly based off of HG1's patch from the bug report, which had ImageRender::Render() call KX_KetsjiEngine::RenderFonts(). However, I have moved RenderFonts() from KX_KetsjiEngine to KX_Scene where all of the other font and rendering functions are. The real fix for this mess would be to not have ImageRender::Render() have so much duplicate code from KX_KetsjiEngine::Render(), but that's a code cleanup problem for another day.
Diffstat (limited to 'source/gameengine/Ketsji/KX_Scene.cpp')
-rw-r--r-- | source/gameengine/Ketsji/KX_Scene.cpp | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/source/gameengine/Ketsji/KX_Scene.cpp b/source/gameengine/Ketsji/KX_Scene.cpp index 8bb9eaeef10..13fb168221d 100644 --- a/source/gameengine/Ketsji/KX_Scene.cpp +++ b/source/gameengine/Ketsji/KX_Scene.cpp @@ -40,6 +40,7 @@ #include "MT_assert.h" #include "KX_KetsjiEngine.h" #include "KX_BlenderMaterial.h" +#include "KX_FontObject.h" #include "RAS_IPolygonMaterial.h" #include "ListValue.h" #include "SCA_LogicManager.h" @@ -352,11 +353,6 @@ list<class KX_Camera*>* KX_Scene::GetCameras() return &m_cameras; } -list<class KX_FontObject*>* KX_Scene::GetFonts() -{ - return &m_fonts; -} - void KX_Scene::SetFramingType(RAS_FrameSettings & frame_settings) { m_frame_settings = frame_settings; @@ -1639,6 +1635,15 @@ void KX_Scene::RenderBuckets(const MT_Transform & cameratransform, KX_BlenderMaterial::EndFrame(); } +void KX_Scene::RenderFonts() +{ + list<KX_FontObject*>::iterator it = m_fonts.begin(); + while (it != m_fonts.end()) { + (*it)->DrawText(); + ++it; + } +} + void KX_Scene::UpdateObjectActivity(void) { if (m_activity_culling) { |