44 lines
1.1 KiB
C++
44 lines
1.1 KiB
C++
|
#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();
|
||
|
}
|