diff options
-rw-r--r-- | source/gameengine/Ketsji/KX_KetsjiEngine.cpp | 18 | ||||
-rw-r--r-- | source/gameengine/Ketsji/KX_KetsjiEngine.h | 1 | ||||
-rw-r--r-- | source/gameengine/Ketsji/KX_Scene.cpp | 15 | ||||
-rw-r--r-- | source/gameengine/Ketsji/KX_Scene.h | 8 | ||||
-rw-r--r-- | source/gameengine/VideoTexture/ImageRender.cpp | 2 |
5 files changed, 19 insertions, 25 deletions
diff --git a/source/gameengine/Ketsji/KX_KetsjiEngine.cpp b/source/gameengine/Ketsji/KX_KetsjiEngine.cpp index f02e842ad2e..1061e9fd571 100644 --- a/source/gameengine/Ketsji/KX_KetsjiEngine.cpp +++ b/source/gameengine/Ketsji/KX_KetsjiEngine.cpp @@ -54,7 +54,6 @@ #include "MT_Transform.h" #include "SCA_IInputDevice.h" #include "KX_Camera.h" -#include "KX_FontObject.h" #include "KX_Dome.h" #include "KX_Light.h" #include "KX_PythonInit.h" @@ -340,7 +339,7 @@ void KX_KetsjiEngine::RenderDome() // do the rendering m_dome->RenderDomeFrame(scene,cam, i); //render all the font objects for this scene - RenderFonts(scene); + scene->RenderFonts(); } list<class KX_Camera*>* cameras = scene->GetCameras(); @@ -358,7 +357,7 @@ void KX_KetsjiEngine::RenderDome() // do the rendering m_dome->RenderDomeFrame(scene, (*it),i); //render all the font objects for this scene - RenderFonts(scene); + scene->RenderFonts(); } it++; @@ -1339,23 +1338,12 @@ void KX_KetsjiEngine::RenderFrame(KX_Scene* scene, KX_Camera* cam) scene->RenderBuckets(camtrans, m_rasterizer, m_rendertools); //render all the font objects for this scene - RenderFonts(scene); + scene->RenderFonts(); if (scene->GetPhysicsEnvironment()) scene->GetPhysicsEnvironment()->debugDrawWorld(); } -void KX_KetsjiEngine::RenderFonts(KX_Scene* scene) -{ - list<class KX_FontObject*>* fonts = scene->GetFonts(); - - list<KX_FontObject*>::iterator it = fonts->begin(); - while (it != fonts->end()) { - (*it)->DrawText(); - ++it; - } -} - /* * To run once per scene */ diff --git a/source/gameengine/Ketsji/KX_KetsjiEngine.h b/source/gameengine/Ketsji/KX_KetsjiEngine.h index 3cba3558db3..4e69c7d35f7 100644 --- a/source/gameengine/Ketsji/KX_KetsjiEngine.h +++ b/source/gameengine/Ketsji/KX_KetsjiEngine.h @@ -205,7 +205,6 @@ private: void RenderDebugProperties(); void RenderShadowBuffers(KX_Scene *scene); void SetBackGround(KX_WorldInfo* worldinfo); - void RenderFonts(KX_Scene* scene); public: KX_KetsjiEngine(class KX_ISystem* system); 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) { diff --git a/source/gameengine/Ketsji/KX_Scene.h b/source/gameengine/Ketsji/KX_Scene.h index 632e1bf9b50..7c3ea946044 100644 --- a/source/gameengine/Ketsji/KX_Scene.h +++ b/source/gameengine/Ketsji/KX_Scene.h @@ -381,10 +381,6 @@ public: ); /** Font Routines */ - - std::list<class KX_FontObject*>* - GetFonts( - ); /** Find a font in the scene by pointer. */ KX_FontObject* @@ -398,6 +394,10 @@ public: KX_FontObject* ); + /** Render the fonts in this scene. */ + void + RenderFonts( + ); /** Camera Routines */ diff --git a/source/gameengine/VideoTexture/ImageRender.cpp b/source/gameengine/VideoTexture/ImageRender.cpp index d251f4f7bcb..f184ab9bd1d 100644 --- a/source/gameengine/VideoTexture/ImageRender.cpp +++ b/source/gameengine/VideoTexture/ImageRender.cpp @@ -275,6 +275,8 @@ void ImageRender::Render() m_scene->RenderBuckets(camtrans, m_rasterizer, m_rendertools); + m_scene->RenderFonts(); + // restore the canvas area now that the render is completed m_canvas->GetWindowArea() = area; } |