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

@@ -142,6 +142,10 @@ void UIPass::createRenderPass() {
passSize = UVector2(viewport->getWidth(), viewport->getHeight());
createRenderPass();
}
Gfx::RenderTargetLayout layout = Gfx::RenderTargetLayout{
.colorAttachments = {colorAttachment},
.depthAttachment = depthAttachment,
};
Array<Gfx::SubPassDependency> dependency = {
{
.srcSubpass = ~0U,
+1 -1
View File
@@ -1009,7 +1009,7 @@ void Graphics::pickPhysicalDevice() {
shaderFloatControls = true;
}
}
rayTracingEnabled = rayTracingPipelineSupport && accelerationStructureSupport && hostOperationsSupport && deviceAddressSupport &&
rayTracingEnabled = false && rayTracingPipelineSupport && accelerationStructureSupport && hostOperationsSupport && deviceAddressSupport &&
descriptorIndexingSupport && spirv14Support && shaderFloatControls;
}
+4 -25
View File
@@ -4,25 +4,18 @@
#include "Graphics/RenderPass/BasePass.h"
#include "Graphics/RenderPass/CachedDepthPass.h"
#include "Graphics/RenderPass/DepthCullingPass.h"
#include "Graphics/RenderPass/FluidRenderPass.h"
#include "Graphics/RenderPass/LightCullingPass.h"
#include "Graphics/RenderPass/RayTracingPass.h"
#include "Graphics/RenderPass/ShadowPass.h"
#include "Graphics/RenderPass/SimulationComputePass.h"
#include "Graphics/RenderPass/SurfaceExtractPass.h"
#include "Graphics/RenderPass/ToneMappingPass.h"
#include "Graphics/RenderPass/VisibilityPass.h"
#include "System/CameraUpdater.h"
#include "System/FluidUpdater.h"
#include "System/LightGather.h"
#include "System/MeshUpdater.h"
#include "Window/Window.h"
#include "Scene/LightEnvironment.h"
using namespace Seele;
GameView::GameView(Gfx::PGraphics graphics, PWindow window, const ViewportCreateInfo& createInfo, std::filesystem::path dllPath)
: View(graphics, window, createInfo, "Game"), graphics(graphics), scene(new Scene(graphics)), gameInterface(dllPath) {
GameView::GameView(Gfx::PGraphics graphics, PWindow window, PScene scene, const ViewportCreateInfo& createInfo)
: View(graphics, window, createInfo, "Game"), graphics(graphics), scene(scene) {
reloadGame();
renderGraph.addPass(new CachedDepthPass(graphics, scene));
renderGraph.addPass(new DepthCullingPass(graphics, scene));
@@ -56,7 +49,6 @@ void GameView::update() {
for (VertexData* vd : VertexData::getList()) {
vd->resetMeshData();
}
systemGraph->run(updateTime);
scene->update(updateTime);
for (VertexData* vd : VertexData::getList()) {
vd->createDescriptors();
@@ -94,29 +86,16 @@ void GameView::applyArea(URect) {
}
void GameView::reloadGame() {
gameInterface.reload();
systemGraph = new SystemGraph();
gameInterface.getGame()->setupScene(scene, systemGraph);
System::OKeyboardInput keyInput = new System::KeyboardInput(scene);
keyboardSystem = keyInput;
systemGraph->addSystem(std::move(keyInput));
systemGraph->addSystem(new System::FluidUpdater(scene));
systemGraph->addSystem(new System::LightGather(scene));
systemGraph->addSystem(new System::MeshUpdater(scene));
systemGraph->addSystem(new System::CameraUpdater(scene));
}
void GameView::keyCallback(KeyCode code, InputAction action, KeyModifierFlags modifier) {
keyboardSystem->keyCallback(code, action, modifier);
}
void GameView::mouseMoveCallback(double xPos, double yPos) { keyboardSystem->mouseCallback(xPos, yPos); }
void GameView::mouseMoveCallback(double xPos, double yPos) { }
void GameView::mouseButtonCallback(MouseButton button, InputAction action, KeyModifierFlags modifier) {
keyboardSystem->mouseButtonCallback(button, action, modifier);
}
void GameView::scrollCallback(double xScroll, double yScroll) { keyboardSystem->scrollCallback(xScroll, yScroll); }
void GameView::scrollCallback(double xScroll, double yScroll) { }
void GameView::fileCallback(int, const char**) {}
+2 -4
View File
@@ -12,7 +12,7 @@
namespace Seele {
class GameView : public View {
public:
GameView(Gfx::PGraphics graphics, PWindow window, const ViewportCreateInfo& createInfo, std::filesystem::path dllPath);
GameView(Gfx::PGraphics graphics, PWindow window, PScene scene, const ViewportCreateInfo& createInfo);
virtual ~GameView();
virtual void beginUpdate() override;
virtual void update() override;
@@ -26,12 +26,10 @@ class GameView : public View {
protected:
virtual void applyArea(URect rect) override;
Gfx::PGraphics graphics;
OScene scene;
GameInterface gameInterface;
PScene scene;
RenderGraph renderGraph;
RenderGraph rayTracingGraph;
OSystemGraph systemGraph;
System::PKeyboardInput keyboardSystem;
float updateTime = 0;
+4 -1
View File
@@ -1,9 +1,11 @@
#include "WindowManager.h"
#include "Graphics/Enums.h"
#include "Graphics/Graphics.h"
#include "System/SystemGraph.h"
using namespace Seele;
WindowManager::WindowManager() {}
WindowManager::WindowManager(PSystemGraph systemGraph) : systemGraph(systemGraph) {}
WindowManager::~WindowManager() {}
@@ -18,6 +20,7 @@ void WindowManager::render() {
window->pollInputs();
if (window->isPaused())
continue;
systemGraph->run(Gfx::getCurrentFrameDelta());
window->render();
}
}
+3 -1
View File
@@ -1,12 +1,13 @@
#pragma once
#include "Containers/Array.h"
#include "System/SystemGraph.h"
#include "Window.h"
namespace Seele {
DECLARE_NAME_REF(Gfx, Graphics)
class WindowManager {
public:
WindowManager();
WindowManager(PSystemGraph systemGraph);
~WindowManager();
OWindow addWindow(Gfx::PGraphics graphics, const WindowCreateInfo& createInfo);
void render();
@@ -15,6 +16,7 @@ class WindowManager {
private:
Array<PWindow> windows;
PSystemGraph systemGraph;
};
DEFINE_REF(WindowManager)
} // namespace Seele