Depth rendering of terrain works
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
@@ -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:
|
||||
};
|
||||
}
|
||||
}
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user