summaryrefslogtreecommitdiffstats
path: root/src/app/app.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/app/app.cpp')
-rw-r--r--src/app/app.cpp19
1 files changed, 11 insertions, 8 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();