Depth rendering of terrain works

This commit is contained in:
Dynamitos
2023-11-10 19:18:09 +01:00
parent effb0c6214
commit c30619d07d
28 changed files with 298 additions and 502 deletions
+3
View File
@@ -1,5 +1,7 @@
target_sources(Engine
PRIVATE
CameraUpdater.h
CameraUpdater.cpp
ComponentSystem.h
Executor.h
Executor.cpp
@@ -14,6 +16,7 @@ target_sources(Engine
target_sources(Engine
PUBLIC FILE_SET HEADERS
FILES
CameraUpdater.h
ComponentSystem.h
Executor.h
LightGather.h
+18
View File
@@ -0,0 +1,18 @@
#include "CameraUpdater.h"
using namespace Seele;
using namespace Seele::System;
CameraUpdater::CameraUpdater(PScene scene)
: ComponentSystem(scene)
{
}
CameraUpdater::~CameraUpdater()
{
}
void CameraUpdater::update(Component::Camera& camera)
{
camera.buildViewMatrix();
}
+19
View File
@@ -0,0 +1,19 @@
#pragma once
#include "ComponentSystem.h"
#include "Component/Camera.h"
namespace Seele
{
namespace System
{
class CameraUpdater : public ComponentSystem<Component::Camera>
{
public:
CameraUpdater(PScene scene);
virtual ~CameraUpdater();
virtual void update(Component::Camera& camera);
private:
};
}
}
+2 -1
View File
@@ -1,6 +1,7 @@
#pragma once
#include "SystemBase.h"
#include "Component/Component.h"
#include "Component/Camera.h"
namespace Seele
{
@@ -12,7 +13,7 @@ class ComponentSystem : public SystemBase
public:
ComponentSystem(PScene scene) : SystemBase(scene) {}
virtual ~ComponentSystem() {}
template<is_component Comp>
template<has_dependencies Comp>
auto getDependencies()
{
return Comp::dependencies;