summaryrefslogtreecommitdiffstats
path: root/src/app
diff options
context:
space:
mode:
authorPiotr Dziwinski <piotrdz@gmail.com>2012-12-14 21:30:35 +0100
committerPiotr Dziwinski <piotrdz@gmail.com>2012-12-14 21:30:35 +0100
commit4811defca2eeea69e40346be6b1647f276db8c76 (patch)
tree52204202603817d09d93ed8a863b69f93ada74b2 /src/app
parent39ac36efda1f7c7b446886cf2508518f06e132ba (diff)
downloadcolobot-4811defca2eeea69e40346be6b1647f276db8c76.tar.gz
colobot-4811defca2eeea69e40346be6b1647f276db8c76.tar.bz2
colobot-4811defca2eeea69e40346be6b1647f276db8c76.zip
Static objects using OpenGL VBOs and display lists
Diffstat (limited to 'src/app')
-rw-r--r--src/app/app.cpp9
-rw-r--r--src/app/app.h2
2 files changed, 11 insertions, 0 deletions
diff --git a/src/app/app.cpp b/src/app/app.cpp
index 823bc77..57a827d 100644
--- a/src/app/app.cpp
+++ b/src/app/app.cpp
@@ -142,6 +142,8 @@ CApplication::CApplication()
m_lowCPU = true;
+ m_useVbo = false;
+
for (int i = 0; i < DIR_MAX; ++i)
m_dataDirs[i] = nullptr;
@@ -243,6 +245,10 @@ ParseArgsStatus CApplication::ParseArguments(int argc, char *argv[])
{
SetDebugMode(true);
}
+ else if (arg == "-vbo")
+ {
+ m_useVbo = true;
+ }
else if (arg == "-loglevel")
{
waitLogLevel = true;
@@ -262,6 +268,7 @@ ParseArgsStatus CApplication::ParseArguments(int argc, char *argv[])
GetLogger()->Message("\n");
GetLogger()->Message("List of available options:\n");
GetLogger()->Message(" -help this help\n");
+ GetLogger()->Message(" -vbo enable OpenGL VBOs\n");
GetLogger()->Message(" -datadir path set custom data directory path\n");
GetLogger()->Message(" -debug enable debug mode (more info printed in logs)\n");
GetLogger()->Message(" -loglevel level set log level to level (one of: trace, debug, info, warn, error, none)\n");
@@ -425,6 +432,8 @@ 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);
diff --git a/src/app/app.h b/src/app/app.h
index 84da0eb..c4288c1 100644
--- a/src/app/app.h
+++ b/src/app/app.h
@@ -449,5 +449,7 @@ protected:
//! Low cpu mode
bool m_lowCPU;
+
+ int m_useVbo; // TODO: temporary
};