#include #include #include "mainwindow.h" #include "platform.h" #include "context.h" #include "renderer.h" #include "worldmanager.h" #include "assetmanager.h" #include "ecs.h" static std::vector extensionList; std::vector platform::getRequiredExtensions() { QVulkanInstance instance; instance.create(); for(const auto& extension : instance.extensions()) extensionList.push_back(extension.data()); instance.destroy(); std::vector extensions; for(const auto& extension : extensionList) extensions.push_back(extension.c_str()); return extensions; } uint32_t platform::getTime() { return 0; } int main(int argc, char* argv[]) { QApplication app(argc, argv); GraphicsConfig config; config.shadowResolution = 256; config.dofDownscale = 2; config.filterPCF = true; config.enableImgui = false; Context context; context.renderer = new Renderer(config); assetManager.setRenderer(context.renderer); worldManager.loadWorld("test.world"); worldManager.switchWorld("test.world"); EntityID entity = ECS::createEntity(worldManager.getCurrentWorld()); auto cameraTransform = ECS::addComponent(entity); cameraTransform->position = glm::vec3(5, 5, 5); auto cameraComponent = ECS::addComponent(entity); cameraComponent->fov = 70.0f; MainWindow window(context); window.show(); return app.exec(); }