Archived
1
Fork 0
This repository has been archived on 2025-04-12. You can view files and clone it, but cannot push or open issues or pull requests.
graph/tools/materialeditor/src/main.cpp

44 lines
1.1 KiB
C++
Raw Normal View History

2018-12-25 07:41:48 -05:00
#include <QApplication>
#include <QVulkanInstance>
#include "mainwindow.h"
#include "platform.h"
#include "context.h"
#include "renderer.h"
#include "worldmanager.h"
#include "assetmanager.h"
#include "ecs.h"
#include "editorstyle.h"
int main(int argc, char* argv[]) {
QApplication app(argc, argv);
app.setStyle(new EditorStyle());
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<TransformComponent>(entity);
cameraTransform->position = glm::vec3(5, 5, 5);
auto cameraComponent = ECS::addComponent<CameraComponent>(entity);
cameraComponent->fov = 70.0f;
MainWindow window(context);
window.show();
return app.exec();
}