[request] per-subset surfaceName identifier
This commit is contained in:
@@ -33,7 +33,7 @@ namespace wi::scene
|
||||
wi::ecs::ComponentManager<TransformComponent>& transforms = componentLibrary.Register<TransformComponent>("wi::scene::Scene::transforms");
|
||||
wi::ecs::ComponentManager<HierarchyComponent>& hierarchy = componentLibrary.Register<HierarchyComponent>("wi::scene::Scene::hierarchy");
|
||||
wi::ecs::ComponentManager<MaterialComponent>& materials = componentLibrary.Register<MaterialComponent>("wi::scene::Scene::materials", 8); // version = 8
|
||||
wi::ecs::ComponentManager<MeshComponent>& meshes = componentLibrary.Register<MeshComponent>("wi::scene::Scene::meshes", 3); // version = 3
|
||||
wi::ecs::ComponentManager<MeshComponent>& meshes = componentLibrary.Register<MeshComponent>("wi::scene::Scene::meshes", 4); // version = 4
|
||||
wi::ecs::ComponentManager<ImpostorComponent>& impostors = componentLibrary.Register<ImpostorComponent>("wi::scene::Scene::impostors");
|
||||
wi::ecs::ComponentManager<ObjectComponent>& objects = componentLibrary.Register<ObjectComponent>("wi::scene::Scene::objects", 4); // version = 4
|
||||
wi::ecs::ComponentManager<RigidBodyPhysicsComponent>& rigidbodies = componentLibrary.Register<RigidBodyPhysicsComponent>("wi::scene::Scene::rigidbodies", 4); // version = 4
|
||||
|
||||
@@ -391,6 +391,7 @@ namespace wi::scene
|
||||
|
||||
struct MeshSubset
|
||||
{
|
||||
std::string surfaceName; // custom identifier for user, not used by engine
|
||||
wi::ecs::Entity materialID = wi::ecs::INVALID_ENTITY;
|
||||
uint32_t indexOffset = 0;
|
||||
uint32_t indexCount = 0;
|
||||
|
||||
@@ -445,6 +445,10 @@ namespace wi::scene
|
||||
SerializeEntity(archive, subsets[i].materialID, seri);
|
||||
archive >> subsets[i].indexOffset;
|
||||
archive >> subsets[i].indexCount;
|
||||
if (seri.GetVersion() >= 4)
|
||||
{
|
||||
archive >> subsets[i].surfaceName;
|
||||
}
|
||||
}
|
||||
|
||||
archive >> tessellationFactor;
|
||||
@@ -535,6 +539,10 @@ namespace wi::scene
|
||||
SerializeEntity(archive, subsets[i].materialID, seri);
|
||||
archive << subsets[i].indexOffset;
|
||||
archive << subsets[i].indexCount;
|
||||
if (seri.GetVersion() >= 4)
|
||||
{
|
||||
archive << subsets[i].surfaceName;
|
||||
}
|
||||
}
|
||||
|
||||
archive << tessellationFactor;
|
||||
|
||||
@@ -9,7 +9,7 @@ namespace wi::version
|
||||
// minor features, major updates, breaking compatibility changes
|
||||
const int minor = 71;
|
||||
// minor bug fixes, alterations, refactors, updates
|
||||
const int revision = 568;
|
||||
const int revision = 569;
|
||||
|
||||
const std::string version_string = std::to_string(major) + "." + std::to_string(minor) + "." + std::to_string(revision);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user