Changeset 323 for trunk/src/formats/assimp_loader.cc
- Timestamp:
- 08/26/14 04:03:10 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/formats/assimp_loader.cc
r302 r323 14 14 using namespace nv; 15 15 16 const intMAX_BONES = 64;16 const unsigned MAX_BONES = 64; 17 17 18 18 struct assimp_plain_vtx … … 90 90 m_mesh_count = 0; 91 91 NV_LOG( nv::LOG_NOTICE, "AssImp loading file..." ); 92 int size = (int)source.size();92 size_t size = source.size(); 93 93 char* data = new char[ size ]; 94 94 source.read( data, size, 1 ); … … 159 159 if ( v.boneweight[i] <= 0.0f ) 160 160 { 161 v.boneindex[i] =m;161 v.boneindex[i] = (int)m; 162 162 v.boneweight[i] = bone->mWeights[w].mWeight; 163 163 found = true; … … 289 289 for ( unsigned int m = 0; m < m_mesh_count; ++m ) 290 290 { 291 sint16 translate[MAX_BONES];291 uint16 translate[MAX_BONES]; 292 292 std::vector< mesh_node_data > bones; 293 293 const aiMesh* mesh = scene->mMeshes[ m ]; … … 304 304 { 305 305 NV_ASSERT( final_bones.size() < MAX_BONES, "Too many bones to merge!" ); 306 sint16 index = (sint16)final_bones.size();306 uint16 index = (uint16)final_bones.size(); 307 307 final_bones.push_back( bone ); 308 308 names[ bone.name ] = index; … … 311 311 else 312 312 { 313 translate[b] = (sint16)iname->second;313 translate[b] = iname->second; 314 314 } 315 315 } … … 326 326 if ( vertex.boneweight[i] > 0.0f ) 327 327 { 328 vertex.boneindex[i] = translate[vertex.boneindex[i]];328 vertex.boneindex[i] = (int)translate[vertex.boneindex[i]]; 329 329 } 330 330 }
Note: See TracChangeset
for help on using the changeset viewer.