From 4811defca2eeea69e40346be6b1647f276db8c76 Mon Sep 17 00:00:00 2001 From: Piotr Dziwinski Date: Fri, 14 Dec 2012 21:30:35 +0100 Subject: Static objects using OpenGL VBOs and display lists --- src/app/app.cpp | 9 +++++++++ src/app/app.h | 2 ++ 2 files changed, 11 insertions(+) (limited to 'src/app') 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(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 }; -- cgit v1.2.3-1-g7c22