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 1.1KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  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 "sol.hpp"
  9. #include <iostream>
  10. #include <vector>
  11. #include <memory>
  12. int main (int argc, char *argv[])
  13. {
  14. glm::ivec3 test(-14, -18, -18);
  15. std::cout << glm::ivec3(test / 16).x << std::endl;
  16. vtk::LoggerSetup lSetup;
  17. lSetup.setup();
  18. spdlog::get("general")->info("Starting Voxeltronik Engine...");
  19. spdlog::get("general");
  20. vtk::ThreadPool::getInstance().addThreads(2);
  21. auto conf = new Config;
  22. conf->loadConfigFromFile("res/config.conf");
  23. conf->addArgumentRule("-w", "graphics.res.x");
  24. conf->addArgumentRule("-h", "graphics.res.y");
  25. conf->loadConfigFromArguments(argc, argv);
  26. sol::state lua;
  27. lua.open_libraries(sol::lib::base, sol::lib::package);
  28. vtk::LoggerSetup::registerScriptInterface(lua);
  29. Config::registerScriptInterface(lua);
  30. lua.script_file("res/init.lua");
  31. /*
  32. vtk::Game game;
  33. game.setConfig(conf);
  34. game.init();
  35. game.setScene(new vtk::TestScene);
  36. game.start();
  37. */
  38. return 0;
  39. }