forked from Dynamitos/Seele
Refactoring graphics
This commit is contained in:
1 parent
28e5c9ff01
commit
1ca861459c
113 files changed
+3131
-3221
No files matched your search
@@ -0,0 +1,32 @@
|
||||
#pragma once
|
||||
#include "Graphics/Descriptor.h"
|
||||
#include "Graphics/Buffer.h"
|
||||
#include "Component/DirectionalLight.h"
|
||||
#include "Component/PointLight.h"
|
||||
|
||||
namespace Seele
|
||||
{
|
||||
class LightEnvironment
|
||||
{
|
||||
public:
|
||||
LightEnvironment(Gfx::PGraphics graphics);
|
||||
~LightEnvironment();
|
||||
void reset();
|
||||
void addDirectionalLight(Component::DirectionalLight dirLight);
|
||||
void addPointLight(Component::PointLight pointLight);
|
||||
void commit();
|
||||
private:
|
||||
#define MAX_DIRECTIONAL_LIGHTS 4
|
||||
#define MAX_POINT_LIGHTS 256
|
||||
Gfx::PShaderBuffer directionalLights;
|
||||
Gfx::PUniformBuffer numDirectional;
|
||||
Gfx::PShaderBuffer pointLights;
|
||||
Gfx::PUniformBuffer numPoints;;
|
||||
Array<Component::DirectionalLight> dirs;
|
||||
Array<Component::PointLight> points;
|
||||
Gfx::PDescriptorLayout layout;
|
||||
Gfx::PDescriptorSet set;
|
||||
Gfx::PGraphics graphics;
|
||||
};
|
||||
DEFINE_REF(LightEnvironment)
|
||||
}
|
||||
Reference in new issue
Block a user