]> git.localhorst.tv Git - blank.git/blobdiff - src/app.cpp
extracted configuration of various parts
[blank.git] / src / app.cpp
index b7e71ec681387512db2dc897a4f6063bce6f0d9a..a6f81f1210ecb677e0043341792ab8a0f9dba8ae 100644 (file)
@@ -6,20 +6,22 @@
 
 namespace blank {
 
-Application::Application(unsigned int seed)
+Application::Application(const Config &config)
 : init_sdl()
 , init_img()
-, init_gl()
+, init_gl(config.doublebuf, config.multisampling)
 , window()
 , ctx(window.CreateContext())
 , init_glew()
 , program()
 , cam()
-, world(seed)
-, interface(world)
+, world(config.world)
+, interface(config.interface, world)
 , test_controller(MakeTestEntity(world))
 , running(false) {
-       GLContext::EnableVSync();
+       if (config.vsync) {
+               GLContext::EnableVSync();
+       }
 
        glClearColor(0.0, 0.0, 0.0, 1.0);
 }