New game interface

This commit is contained in:
Dynamitos
2023-02-01 22:13:04 +01:00
parent 0dce84459e
commit 9e1e4076f0
91 changed files with 268 additions and 21014 deletions
+12
View File
@@ -3,6 +3,8 @@
#include "Graphics/Mesh.h"
#include "Component/StaticMesh.h"
#include "Component/Transform.h"
#include "Asset/AssetRegistry.h"
#include "Asset/TextureAsset.h"
using namespace Seele;
@@ -88,4 +90,14 @@ LightEnv Scene::getLightBuffer() const
result.numDirectionalLights = 1;
result.numPointLights = 0;
return result;
}
Component::Skybox Scene::getSkybox()
{
return Seele::Component::Skybox {
.day = AssetRegistry::findTexture("FS000_Day_01")->getTexture().cast<Gfx::TextureCube>(),
.night = AssetRegistry::findTexture("FS000_Night_01")->getTexture().cast<Gfx::TextureCube>(),
.fogColor = Vector(0.2, 0.1, 0.6),
.blendFactor = 0,
};
}
+2
View File
@@ -4,6 +4,7 @@
#include "Graphics/Graphics.h"
#include "Graphics/MeshBatch.h"
#include "Physics/PhysicsSystem.h"
#include "Component/Skybox.h"
namespace Seele
{
@@ -70,6 +71,7 @@ public:
}
Array<StaticMeshBatch> getStaticMeshes();
LightEnv getLightBuffer() const;
Component::Skybox getSkybox();
Gfx::PStructuredBuffer getSceneDataBuffer() const { return sceneDataBuffer; }
Gfx::PGraphics getGraphics() const { return graphics; }
entt::registry registry;