Fix miscellaneus errors

This commit is contained in:
Dynamitos committed 2026-11-09 20:07:40 +01:00
1 parent c5c66f8cf3
commit 803531c608
17 files changed
+146 -88

No files matched your search

+26 -13
View File
@@ -10,7 +10,12 @@
#include "Material/Material.h"
#include "Graphics/Vulkan/Graphics.h"
#include "Graphics/StaticMeshVertexData.h"
#include "System/SystemGraph.h"
#include "Window/PlayView.h"
#include "System/CameraUpdater.h"
#include "System/FluidUpdater.h"
#include "System/LightGather.h"
#include "System/MeshUpdater.h"
#include "Window/WindowManager.h"
#include "Window/InspectorView.h"
#include "Scene/Scene.h" // OScene/Scene - the InspectorView's entity pane needs a live scene
@@ -136,7 +141,18 @@ int main(int argc, char** argv) {
StaticMeshVertexData* vd = StaticMeshVertexData::getInstance();
vd->init(graphics);
OWindowManager windowManager = new WindowManager();
GameInterface gameInterface(binaryPath);
OScene scene = new Scene(graphics);
gameInterface.reload();
OSystemGraph systemGraph = new SystemGraph();
gameInterface.getGame()->setupScene(scene, systemGraph);
systemGraph->addSystem(new System::KeyboardInput(scene));
systemGraph->addSystem(new System::FluidUpdater(scene));
systemGraph->addSystem(new System::LightGather(scene));
systemGraph->addSystem(new System::MeshUpdater(scene));
systemGraph->addSystem(new System::CameraUpdater(scene));
OWindowManager windowManager = new WindowManager(systemGraph);
AssetRegistry::init(sourcePath / "Assets", graphics);
AssetImporter::init(graphics);
AssetImporter::importFont(FontImportArgs{
@@ -172,18 +188,15 @@ int main(int argc, char** argv) {
.preferredFormat = Gfx::SE_FORMAT_B8G8R8A8_SRGB,
};
auto window = windowManager->addWindow(graphics, mainWindowInfo);
// ViewportCreateInfo sceneViewInfo = {
// .dimensions =
// {
// .size = {1920, 1080},
// .offset = {0, 0},
// },
// };
// OGameView sceneView = new Editor::PlayView(graphics, window, sceneViewInfo, binaryPath);
// sceneView->setFocused();
// The windowed editor path has no pre-existing scene; the InspectorView's entity
// pane needs one to enumerate. Create a fresh Scene on the live (windowed) device.
OScene scene = new Scene(graphics);
ViewportCreateInfo sceneViewInfo = {
.dimensions =
{
.size = {1920, 1080},
.offset = {0, 0},
},
};
OGameView sceneView = new Editor::PlayView(graphics, window, scene, sceneViewInfo);
sceneView->setFocused();
OInspectorView inspectorView = new Editor::InspectorView(graphics, window,
ViewportCreateInfo{
.dimensions =