diff options
Diffstat (limited to 'src/app')
-rw-r--r-- | src/app/app.cpp | 19 | ||||
-rw-r--r-- | src/app/app.h | 10 |
2 files changed, 19 insertions, 10 deletions
diff --git a/src/app/app.cpp b/src/app/app.cpp index 57a827d..9f1667b 100644 --- a/src/app/app.cpp +++ b/src/app/app.cpp @@ -25,6 +25,7 @@ #include "common/image.h" #include "common/key.h" +#include "graphics/engine/modelmanager.h" #include "graphics/opengl/gldevice.h" #include "object/robotmain.h" @@ -94,6 +95,7 @@ CApplication::CApplication() m_engine = nullptr; m_device = nullptr; + m_modelManager = nullptr; m_robotMain = nullptr; m_sound = nullptr; @@ -142,8 +144,6 @@ CApplication::CApplication() m_lowCPU = true; - m_useVbo = false; - for (int i = 0; i < DIR_MAX; ++i) m_dataDirs[i] = nullptr; @@ -245,10 +245,6 @@ ParseArgsStatus CApplication::ParseArguments(int argc, char *argv[]) { SetDebugMode(true); } - else if (arg == "-vbo") - { - m_useVbo = true; - } else if (arg == "-loglevel") { waitLogLevel = true; @@ -432,8 +428,6 @@ bool CApplication::Create() return false; } - static_cast<Gfx::CGLDevice*>(m_device)->SetUseVbo(m_useVbo); - // Create the 3D engine m_engine = new Gfx::CEngine(m_iMan, this); @@ -446,6 +440,9 @@ bool CApplication::Create() return false; } + // Create model manager + m_modelManager = new Gfx::CModelManager(m_engine); + // Create the robot application. m_robotMain = new CRobotMain(m_iMan, this); @@ -525,6 +522,12 @@ void CApplication::Destroy() m_sound = nullptr; } + if (m_modelManager != nullptr) + { + delete m_modelManager; + m_modelManager = nullptr; + } + if (m_engine != nullptr) { m_engine->Destroy(); diff --git a/src/app/app.h b/src/app/app.h index c4288c1..d8f6206 100644 --- a/src/app/app.h +++ b/src/app/app.h @@ -42,6 +42,10 @@ class CEventQueue; class CRobotMain; class CSoundInterface; +namespace Gfx { +class CModelManager; +} + /** * \struct JoystickDevice * \brief Information about a joystick device @@ -369,11 +373,15 @@ protected: Gfx::CEngine* m_engine; //! Graphics device Gfx::CDevice* m_device; + //! 3D models manager + Gfx::CModelManager* m_modelManager; //! Sound subsystem CSoundInterface* m_sound; //! Main class of the proper game engine CRobotMain* m_robotMain; + //! Plugin manager CPluginManager* m_pluginManager; + //! Profile (INI) reader/writer CProfile* m_profile; //! Code to return at exit @@ -449,7 +457,5 @@ protected: //! Low cpu mode bool m_lowCPU; - - int m_useVbo; // TODO: temporary }; |