You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

main.cpp 774B

123456789101112131415161718192021222324252627282930313233343536
  1. #include "game.h"
  2. #include "scenes/testscene.h"
  3. #include "config.h"
  4. #include "mathplus.h"
  5. #include "spdlog/spdlog.h"
  6. #include "loggersetup.h"
  7. #include "threadpool.h"
  8. #include <iostream>
  9. #include <vector>
  10. #include <memory>
  11. int main (int argc, char *argv[])
  12. {
  13. vtk::LoggerSetup lSetup;
  14. lSetup.setup();
  15. spdlog::get("general")->info("Starting Voxeltronik Engine...");
  16. spdlog::get("general");
  17. vtk::ThreadPool::getInstance().addThreads(2);
  18. auto conf = new Config;
  19. conf->loadConfigFromFile("res/config.conf");
  20. conf->addArgumentRule("-w", "graphics.res.x");
  21. conf->addArgumentRule("-h", "graphics.res.y");
  22. conf->loadConfigFromArguments(argc, argv);
  23. vtk::Game game;
  24. game.setConfig(conf);
  25. game.init();
  26. game.setScene(new vtk::TestScene);
  27. game.start();
  28. return 0;
  29. }