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

52 lines
1.5 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"
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-01-29 18:58:59 +01:00
private:
2023-11-06 14:47:21 +01:00
OScene scene;
PEntity camera;
2023-01-29 18:58:59 +01:00
GameInterface gameInterface;
RenderGraph<
DepthPrepass,
LightCullingPass,
BasePass,
SkyboxRenderPass
> renderGraph;
PSystemGraph systemGraph;
dp::thread_pool<> threadPool;
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