compiles again

This commit is contained in:
Dynamitos
2023-11-05 10:36:01 +01:00
parent 4746c0f838
commit 77eb92838c
112 changed files with 1717 additions and 1540 deletions
+13 -3
View File
@@ -16,7 +16,7 @@ LightEnvironment::LightEnvironment(Gfx::PGraphics graphics)
.size = sizeof(LightEnv),
.data = (uint8*) &lightEnv,
},
.bDynamic = true,
.dynamic = true,
});
directionalLights = graphics->createShaderBuffer(ShaderBufferCreateInfo{
.sourceData = {
@@ -24,7 +24,7 @@ LightEnvironment::LightEnvironment(Gfx::PGraphics graphics)
.data = (uint8*)dirs.data(),
},
.stride = sizeof(Component::DirectionalLight),
.bDynamic = true,
.dynamic = true,
});
pointLights = graphics->createShaderBuffer(ShaderBufferCreateInfo{
.sourceData = {
@@ -32,7 +32,7 @@ LightEnvironment::LightEnvironment(Gfx::PGraphics graphics)
.data = (uint8*)dirs.data(),
},
.stride = sizeof(Component::PointLight),
.bDynamic = true,
.dynamic = true,
});
}
@@ -78,3 +78,13 @@ void LightEnvironment::commit()
set->updateBuffer(1, directionalLights);
set->updateBuffer(2, pointLights);
}
const Gfx::PDescriptorLayout Seele::LightEnvironment::getDescriptorLayout() const
{
return layout;
}
Gfx::PDescriptorSet Seele::LightEnvironment::getDescriptorSet()
{
return set;
}
+3 -1
View File
@@ -15,6 +15,8 @@ public:
void addDirectionalLight(Component::DirectionalLight dirLight);
void addPointLight(Component::PointLight pointLight);
void commit();
const Gfx::PDescriptorLayout getDescriptorLayout() const;
Gfx::PDescriptorSet getDescriptorSet();
private:
#define MAX_DIRECTIONAL_LIGHTS 4
#define MAX_POINT_LIGHTS 256
@@ -29,7 +31,7 @@ private:
Array<Component::DirectionalLight> dirs;
Array<Component::PointLight> points;
Gfx::ODescriptorLayout layout;
Gfx::ODescriptorSet set;
Gfx::PDescriptorSet set;
Gfx::PGraphics graphics;
};
DEFINE_REF(LightEnvironment)
+1
View File
@@ -25,6 +25,7 @@ Scene::~Scene()
void Scene::update(float deltaTime)
{
lightEnv->reset();
physics.update(deltaTime);
}