Files
Seele/src/Engine/Window/GameView.h
T

46 lines
1.4 KiB
C++
Raw Normal View History

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;
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
2024-05-30 16:56:22 +02:00
virtual void keyCallback(Seele::KeyCode code, Seele::InputAction action, Seele::KeyModifier modifier) override;
virtual void mouseMoveCallback(double xPos, double yPos) override;
virtual void mouseButtonCallback(Seele::MouseButton button, Seele::InputAction action, Seele::KeyModifier modifier) override;
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