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

45 lines
1.4 KiB
C++
Raw Normal View History

2023-01-29 18:58:59 +01:00
#pragma once
#include "Window/View.h"
#include "Scene/Scene.h"
2023-11-17 22:31:26 +01:00
#include "System/KeyboardInput.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
namespace Seele
{
2024-05-30 16:56:22 +02:00
class GameView : public View
{
public:
2023-02-24 22:09:07 +01:00
GameView(Gfx::PGraphics graphics, PWindow window, const ViewportCreateInfo &createInfo, std::string 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;
OScene scene;
GameInterface gameInterface;
2024-04-05 10:41:59 +02:00
RenderGraph renderGraph;
2023-01-29 18:58:59 +01:00
2024-05-30 16:56:22 +02:00
PSystemGraph systemGraph;
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;
virtual void fileCallback(int count, const char **paths) override;
};
DEFINE_REF(GameView)
2023-01-29 18:58:59 +01:00
} // namespace Seele