Progress i guess
This commit is contained in:
@@ -4,6 +4,8 @@
|
||||
#include "Component/KeyboardInput.h"
|
||||
#include "Actor/CameraActor.h"
|
||||
#include "Asset/AssetRegistry.h"
|
||||
#include "System/LightGather.h"
|
||||
#include "System/MeshUpdater.h"
|
||||
|
||||
using namespace Seele;
|
||||
|
||||
@@ -12,12 +14,13 @@ GameView::GameView(Gfx::PGraphics graphics, PWindow window, const ViewportCreate
|
||||
, scene(new Scene(graphics))
|
||||
, gameInterface(dllPath)
|
||||
, renderGraph(RenderGraphBuilder::build(
|
||||
DepthPrepass(graphics, scene),
|
||||
LightCullingPass(graphics, scene),
|
||||
BasePass(graphics, scene),
|
||||
SkyboxRenderPass(graphics, scene)
|
||||
DepthPrepass(graphics, scene)
|
||||
//LightCullingPass(graphics, scene),
|
||||
//BasePass(graphics, scene),
|
||||
//SkyboxRenderPass(graphics, scene)
|
||||
))
|
||||
{
|
||||
camera = new CameraActor(scene);
|
||||
reloadGame();
|
||||
renderGraph.updateViewport(viewport);
|
||||
}
|
||||
@@ -67,11 +70,12 @@ void GameView::render()
|
||||
|
||||
void GameView::reloadGame()
|
||||
{
|
||||
scene = new Scene(graphics);
|
||||
gameInterface.reload(AssetRegistry::getInstance());
|
||||
|
||||
systemGraph = new SystemGraph();
|
||||
gameInterface.getGame()->setupScene(scene, systemGraph);
|
||||
systemGraph->addSystem(new System::LightGather(scene));
|
||||
systemGraph->addSystem(new System::MeshUpdater(scene));
|
||||
}
|
||||
|
||||
void GameView::keyCallback(KeyCode code, InputAction action, KeyModifier)
|
||||
|
||||
@@ -28,13 +28,13 @@ public:
|
||||
void reloadGame();
|
||||
private:
|
||||
OScene scene;
|
||||
PEntity camera;
|
||||
OEntity camera;
|
||||
GameInterface gameInterface;
|
||||
RenderGraph<
|
||||
DepthPrepass,
|
||||
LightCullingPass,
|
||||
BasePass,
|
||||
SkyboxRenderPass
|
||||
DepthPrepass
|
||||
//LightCullingPass,
|
||||
//BasePass,
|
||||
//SkyboxRenderPass
|
||||
> renderGraph;
|
||||
|
||||
PSystemGraph systemGraph;
|
||||
|
||||
@@ -4,9 +4,9 @@
|
||||
|
||||
using namespace Seele;
|
||||
|
||||
Window::Window(PWindowManager owner, Gfx::PWindow handle)
|
||||
Window::Window(PWindowManager owner, Gfx::OWindow handle)
|
||||
: owner(owner)
|
||||
, gfxHandle(handle)
|
||||
, gfxHandle(std::move(handle))
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
@@ -9,7 +9,7 @@ DECLARE_REF(WindowManager)
|
||||
class Window
|
||||
{
|
||||
public:
|
||||
Window(PWindowManager owner, Gfx::PWindow handle);
|
||||
Window(PWindowManager owner, Gfx::OWindow handle);
|
||||
~Window();
|
||||
void addView(PView view);
|
||||
void render();
|
||||
@@ -19,7 +19,7 @@ public:
|
||||
protected:
|
||||
PWindowManager owner;
|
||||
Array<PView> views;
|
||||
Gfx::PWindow gfxHandle;
|
||||
Gfx::OWindow gfxHandle;
|
||||
|
||||
//void viewWorker(size_t viewIndex);
|
||||
};
|
||||
|
||||
@@ -13,8 +13,7 @@ WindowManager::~WindowManager()
|
||||
|
||||
PWindow WindowManager::addWindow(Gfx::PGraphics graphics, const WindowCreateInfo &createInfo)
|
||||
{
|
||||
Gfx::OWindow handle = graphics->createWindow(createInfo);
|
||||
OWindow window = new Window(this, handle);
|
||||
OWindow window = new Window(this, graphics->createWindow(createInfo));
|
||||
PWindow ref = window;
|
||||
windows.add(std::move(window));
|
||||
return ref;
|
||||
|
||||
Reference in New Issue
Block a user