2023-01-29 18:58:59 +01:00
|
|
|
#pragma once
|
|
|
|
|
#include "Scene/Scene.h"
|
2023-11-17 22:31:26 +01:00
|
|
|
#include "System/KeyboardInput.h"
|
2024-06-09 12:20:04 +02:00
|
|
|
#include "Window/View.h"
|
|
|
|
|
|
2023-11-06 14:47:21 +01:00
|
|
|
#ifdef WIN32
|
2023-01-29 18:58:59 +01:00
|
|
|
#include "Platform/Windows/GameInterface.h" // TODO
|
2023-11-06 14:47:21 +01:00
|
|
|
#else
|
|
|
|
|
#include "Platform/Linux/GameInterface.h"
|
|
|
|
|
#endif
|
2023-01-29 18:58:59 +01:00
|
|
|
|
2024-06-09 12:20:04 +02:00
|
|
|
namespace Seele {
|
|
|
|
|
class GameView : public View {
|
2024-05-30 16:56:22 +02:00
|
|
|
public:
|
2025-04-11 13:49:37 +02:00
|
|
|
GameView(Gfx::PGraphics graphics, PWindow window, const ViewportCreateInfo& createInfo, std::filesystem::path dllPath);
|
2023-01-29 18:58:59 +01:00
|
|
|
virtual ~GameView();
|
2024-05-30 16:56:22 +02:00
|
|
|
virtual void beginUpdate() override;
|
|
|
|
|
virtual void update() override;
|
|
|
|
|
virtual void commitUpdate() override;
|
2023-01-29 18:58:59 +01:00
|
|
|
|
2024-05-30 16:56:22 +02:00
|
|
|
virtual void prepareRender() override;
|
|
|
|
|
virtual void render() override;
|
2023-04-09 16:39:53 +02:00
|
|
|
|
2024-05-30 16:56:22 +02:00
|
|
|
void reloadGame();
|
|
|
|
|
|
|
|
|
|
protected:
|
|
|
|
|
virtual void applyArea(URect rect) override;
|
2025-02-14 00:39:53 +01:00
|
|
|
Gfx::PGraphics graphics;
|
2024-05-30 16:56:22 +02:00
|
|
|
OScene scene;
|
|
|
|
|
GameInterface gameInterface;
|
2024-04-05 10:41:59 +02:00
|
|
|
RenderGraph renderGraph;
|
2024-12-25 14:59:08 +01:00
|
|
|
RenderGraph rayTracingGraph;
|
2023-01-29 18:58:59 +01:00
|
|
|
|
2025-08-10 19:16:55 +02:00
|
|
|
OSystemGraph systemGraph;
|
2024-05-30 16:56:22 +02:00
|
|
|
System::PKeyboardInput keyboardSystem;
|
|
|
|
|
float updateTime = 0;
|
2023-01-29 18:58:59 +01:00
|
|
|
|
2026-04-11 10:15:35 +02:00
|
|
|
virtual void keyCallback(KeyCode code, InputAction action, KeyModifierFlags modifier) override;
|
2024-05-30 16:56:22 +02:00
|
|
|
virtual void mouseMoveCallback(double xPos, double yPos) override;
|
2026-04-11 10:15:35 +02:00
|
|
|
virtual void mouseButtonCallback(MouseButton button, InputAction action, KeyModifierFlags modifier) override;
|
2024-05-30 16:56:22 +02:00
|
|
|
virtual void scrollCallback(double xOffset, double yOffset) override;
|
2024-06-09 12:20:04 +02:00
|
|
|
virtual void fileCallback(int count, const char** paths) override;
|
|
|
|
|
};
|
|
|
|
|
DEFINE_REF(GameView)
|
2023-01-29 18:58:59 +01:00
|
|
|
} // namespace Seele
|