Changeset 224 for trunk/src/formats/md2_loader.cc
- Timestamp:
- 01/02/14 20:52:34 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/formats/md2_loader.cc
r204 r224 241 241 } 242 242 243 mesh_data* nv::md2_loader::release_mesh_data() 244 { 245 mesh_data_creator m; 246 247 load_positions( m.get_positions() ); 248 load_normals( m.get_normals() ); 249 load_texcoords( m.get_texcoords() ); 250 load_indicies( m.get_indices() ); 251 252 m_size = m.get_indices().size(); 253 return m.release(); 254 } 255 256 mesh_data* nv::md2_loader::get_frame( sint32 frame ) 257 { 258 mesh_data_creator m; 259 260 load_positions( m.get_positions(), frame ); 261 load_normals( m.get_normals(), frame ); 262 load_texcoords( m.get_texcoords() ); 263 load_indicies( m.get_indices() ); 264 265 m_size = m.get_indices().size(); 266 return m.release(); 267 } 268 269 270 /* 243 271 mesh* nv::md2_loader::release_mesh() 244 272 { … … 255 283 vertex_attribute< vec3 >* normal = m->add_attribute<vec3>("nv_normal"); 256 284 vertex_attribute< vec2 >* texcoord = m->add_attribute<vec2>("nv_texcoord"); 257 vertex_attribute< uint 16 >* indices = m->add_indices<uint16>();285 vertex_attribute< uint32 >* indices = m->add_indices<uint32>(); 258 286 259 287 load_positions( position->get(), frame ); … … 266 294 return m; 267 295 } 296 */ 268 297 269 298 size_t md2_loader::get_max_frames() const … … 344 373 } 345 374 346 void md2_loader::load_indicies( std::vector<uint 16>& idx )375 void md2_loader::load_indicies( std::vector<uint32>& idx ) 347 376 { 348 377 idx.assign( m_new_indexes.begin(), m_new_indexes.end() );
Note: See TracChangeset
for help on using the changeset viewer.