Sets the name of the model during loading

This commit is contained in:
2024-06-24 07:53:48 -04:00
parent 27648ff58a
commit 03a2d998e8
2 changed files with 3 additions and 2 deletions

View File

@@ -27,8 +27,6 @@ namespace fgl::engine
class Model
{
Device& m_device;
static std::vector< vk::DrawIndexedIndirectCommand > buildParameters( const std::vector< Primitive >&
primitives );
static OrientedBoundingBox< CoordinateSpace::Model > buildBoundingBox( const std::vector< Primitive >&
@@ -68,6 +66,8 @@ namespace fgl::engine
const std::string& getName() const { return m_name; }
void setName( std::string str ) { m_name = str; }
Model(
Device& device, ModelBuilder& builder, const OrientedBoundingBox< CoordinateSpace::Model > bounding_box );

View File

@@ -345,6 +345,7 @@ namespace fgl::engine
log::debug( "Skin IDX: {}", skin_idx );
std::shared_ptr< Model > model { loadModel( mesh_idx, root ) };
model->setName( node.name );
assert( model );