Create VkLevelMeshUploader

This commit is contained in:
Magnus Norddahl 2023-12-06 15:57:46 +01:00
commit 486a08e882
8 changed files with 425 additions and 329 deletions

View file

@ -81,14 +81,14 @@ LevelSubmesh::LevelSubmesh()
Mesh.Vertices.Push({ maxval, maxval, maxval });
for (int i = 0; i < 3 * 4; i++)
Mesh.Elements.Push(i);
Mesh.Indexes.Push(i);
UpdateCollision();
}
void LevelSubmesh::UpdateCollision()
{
Collision = std::make_unique<TriangleMeshShape>(Mesh.Vertices.Data(), Mesh.Vertices.Size(), Mesh.Elements.Data(), Mesh.Elements.Size());
Collision = std::make_unique<TriangleMeshShape>(Mesh.Vertices.Data(), Mesh.Vertices.Size(), Mesh.Indexes.Data(), Mesh.Indexes.Size());
}
void LevelSubmesh::GatherSurfacePixelStats(LevelMeshSurfaceStats& stats)

View file

@ -259,7 +259,7 @@ public:
struct
{
TArray<FFlatVertex> Vertices;
TArray<uint32_t> Elements;
TArray<uint32_t> Indexes;
TArray<int> SurfaceIndexes;
TArray<int> UniformIndexes;
TArray<SurfaceUniforms> Uniforms;