Refactoring graphics
This commit is contained in:
@@ -3,6 +3,8 @@ target_sources(Engine
|
||||
ComponentSystem.h
|
||||
Executor.h
|
||||
Executor.cpp
|
||||
LightGather.h
|
||||
LightGather.cpp
|
||||
MeshUpdater.h
|
||||
MeshUpdater.cpp
|
||||
SystemBase.h
|
||||
@@ -13,7 +15,8 @@ target_sources(Engine
|
||||
PUBLIC FILE_SET HEADERS
|
||||
FILES
|
||||
ComponentSystem.h
|
||||
MeshUpdater.h
|
||||
Executor.h
|
||||
LightGather.h
|
||||
MeshUpdater.h
|
||||
SystemBase.h
|
||||
SystemGraph.h)
|
||||
@@ -0,0 +1,18 @@
|
||||
#include "LightGather.h"
|
||||
|
||||
using namespace Seele;
|
||||
using namespace Seele::System;
|
||||
|
||||
LightGather::LightGather(PScene scene)
|
||||
: SystemBase(scene)
|
||||
, lightEnv(scene->getLightEnvironment())
|
||||
{
|
||||
}
|
||||
|
||||
LightGather::~LightGather()
|
||||
{
|
||||
}
|
||||
|
||||
void LightGather::update()
|
||||
{
|
||||
}
|
||||
@@ -0,0 +1,18 @@
|
||||
#pragma once
|
||||
#include "SystemBase.h"
|
||||
|
||||
namespace Seele
|
||||
{
|
||||
namespace System
|
||||
{
|
||||
class LightGather : public SystemBase
|
||||
{
|
||||
public:
|
||||
LightGather(PScene scene);
|
||||
virtual ~LightGather();
|
||||
virtual void update() override;
|
||||
private:
|
||||
PLightEnvironment lightEnv;
|
||||
};
|
||||
}
|
||||
}
|
||||
@@ -3,6 +3,11 @@
|
||||
using namespace Seele;
|
||||
using namespace Seele::System;
|
||||
|
||||
MeshUpdater::MeshUpdater(PScene scene)
|
||||
: ComponentSystem<Component::Transform, Component::Mesh>(scene)
|
||||
{
|
||||
}
|
||||
|
||||
void MeshUpdater::update(Component::Transform& transform, Component::Mesh& mesh)
|
||||
{
|
||||
mesh.vertexData->updateMesh(transform, mesh);
|
||||
|
||||
@@ -10,6 +10,8 @@ namespace System
|
||||
class MeshUpdater : public ComponentSystem<Component::Transform, Component::Mesh>
|
||||
{
|
||||
public:
|
||||
MeshUpdater(PScene scene);
|
||||
virtual ~MeshUpdater();
|
||||
virtual void update(Component::Transform& transform, Component::Mesh& mesh) override;
|
||||
private:
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user