Changeset 280 for trunk/src/formats
- Timestamp:
- 07/08/14 18:29:24 (11 years ago)
- Location:
- trunk/src/formats
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/formats/assimp_loader.cc
r279 r280 143 143 } 144 144 145 mesh_raw_ index_channel* ichannel = mesh_raw_index_channel::create( USHORT, mesh->mNumFaces * 3 );146 result-> set_index_channel( ichannel );145 mesh_raw_channel* ichannel = mesh_raw_channel::create_index( USHORT, mesh->mNumFaces * 3 ); 146 result->add_channel( ichannel ); 147 147 uint16* indices = (uint16*)ichannel->data; 148 148 for (unsigned int i=0; i<mesh->mNumFaces; i++) … … 294 294 { 295 295 mesh_data* mesh = model->meshes[m]; 296 mesh_raw_channel* channel = mesh->get_channel_data()[0]; 296 mesh_raw_channel* channel = mesh->get_raw_channels()[0]; 297 NV_ASSERT( !channel->is_index(), "index channel in release_merged!" ); 297 298 assimp_skinned_vtx* va = (assimp_skinned_vtx*)channel->data; 298 299 for ( unsigned v = 0; v < channel->count; ++v ) -
trunk/src/formats/md2_loader.cc
r240 r280 359 359 } 360 360 361 mesh_raw_ index_channel* ic = mesh_raw_index_channel::create< uint16 >( m_new_indexes.size() );361 mesh_raw_channel* ic = mesh_raw_channel::create_index< uint16 >( m_new_indexes.size() ); 362 362 if ( m_new_indexes.size() > 0 ) 363 363 { … … 369 369 result->add_channel( mc_pn ); 370 370 result->add_channel( mc_t ); 371 result-> set_index_channel( ic );371 result->add_channel( ic ); 372 372 return result; 373 373 } -
trunk/src/formats/md3_loader.cc
r241 r280 377 377 index = 0; 378 378 sint32 index_base = 0; 379 mesh_raw_ index_channel* ic = mesh_raw_index_channel::create< uint16 >( index_count );379 mesh_raw_channel* ic = mesh_raw_channel::create_index< uint16 >( index_count ); 380 380 uint16* icp = (uint16*)ic->data; 381 381 for ( sint32 i = 0; i < num_surfaces; ++i ) … … 396 396 result->add_channel( mc_pn ); 397 397 result->add_channel( mc_t ); 398 result-> set_index_channel( ic );398 result->add_channel( ic ); 399 399 return result; 400 400 } -
trunk/src/formats/md5_loader.cc
r261 r280 145 145 sstream >> num_tris; 146 146 147 mesh_raw_ index_channel* ch_i = mesh_raw_index_channel::create<uint32>( num_tris * 3 );147 mesh_raw_channel* ch_i = mesh_raw_channel::create_index<uint32>( num_tris * 3 ); 148 148 uint32* vtx_i = (uint32*)ch_i->data; 149 149 mesh->m_idata = vtx_i; 150 150 uint32 idx = 0; 151 mesh-> set_index_channel( ch_i );151 mesh->add_channel( ch_i ); 152 152 153 153 next_line( sstream ); -
trunk/src/formats/obj_loader.cc
r240 r280 334 334 channel->desc = m_descriptor; 335 335 channel->count = reader->size * 3; 336 channel->size = reader->raw_size();337 336 338 337 mesh_data* mesh = new mesh_data();
Note: See TracChangeset
for help on using the changeset viewer.