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

56 lines
1.6 KiB
C++
Raw Normal View History

2023-01-29 18:58:59 +01:00
#pragma once
#include "Window/View.h"
#include "Scene/Scene.h"
#include "Graphics/RenderPass/DepthPrepass.h"
#include "Graphics/RenderPass/LightCullingPass.h"
#include "Graphics/RenderPass/BasePass.h"
#include "Graphics/RenderPass/SkyboxRenderPass.h"
2024-01-26 09:58:01 +01:00
#include "Graphics/RenderPass/DebugPass.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
{
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();
virtual void beginUpdate() override;
virtual void update() override;
virtual void commitUpdate() override;
virtual void prepareRender() override;
virtual void render() override;
2023-04-09 16:39:53 +02:00
void reloadGame();
2023-12-28 21:42:18 +01:00
protected:
virtual void applyArea(URect rect) override;
2023-11-06 14:47:21 +01:00
OScene scene;
2023-01-29 18:58:59 +01:00
GameInterface gameInterface;
RenderGraph<
2023-11-10 22:26:47 +01:00
DepthPrepass,
LightCullingPass,
BasePass,
2024-01-26 09:58:01 +01:00
DebugPass,
2023-11-10 22:26:47 +01:00
SkyboxRenderPass
2023-01-29 18:58:59 +01:00
> renderGraph;
PSystemGraph systemGraph;
2023-11-17 22:31:26 +01:00
System::PKeyboardInput keyboardSystem;
2023-12-17 16:16:46 +01:00
ThreadPool threadPool;
2023-01-29 18:58:59 +01:00
float updateTime = 0;
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)
} // namespace Seele