Ignore:
Timestamp:
07/15/15 19:59:40 (10 years ago)
Author:
epyon
Message:
  • mesh nodes store name hash instead of string
  • nmd format refactoring
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/gfx/skeletal_mesh.cc

    r419 r420  
    173173{
    174174        if ( m_prepared ) return;
    175         unordered_map< std::string, nv::uint16 > bone_names;
     175        unordered_map< uint64, uint16 > bone_names;
    176176        m_offsets = new mat4[ bones->get_count() ];
    177177        for ( nv::uint16 bi = 0; bi < bones->get_count(); ++bi )
    178178        {
    179179                const mesh_node_data* bone = bones->get_node(bi);
    180                 bone_names[ bone->name ] = bi;
     180                bone_names[ bone->name_hash ] = bi;
    181181                m_offsets[bi] = bone->transform;
    182182        }
     
    187187                sint16 bone_id = -1;
    188188
    189                 auto bi = bone_names.find( node->name );
     189                auto bi = bone_names.find( node->name_hash );
    190190                if ( bi != bone_names.end() )
    191191                {
Note: See TracChangeset for help on using the changeset viewer.