Ignore:
Timestamp:
01/02/14 20:52:34 (11 years ago)
Author:
epyon
Message:
  • universal mesh format
  • removed keyframed_mesh_data
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/formats/md2_loader.cc

    r204 r224  
    241241}
    242242
     243mesh_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
     256mesh_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/*
    243271mesh* nv::md2_loader::release_mesh()
    244272{
     
    255283        vertex_attribute< vec3 >*   normal   = m->add_attribute<vec3>("nv_normal");
    256284        vertex_attribute< vec2 >*   texcoord = m->add_attribute<vec2>("nv_texcoord");
    257         vertex_attribute< uint16 >* indices  = m->add_indices<uint16>();
     285        vertex_attribute< uint32 >* indices  = m->add_indices<uint32>();
    258286
    259287        load_positions( position->get(), frame );
     
    266294        return m;
    267295}
     296*/
    268297
    269298size_t md2_loader::get_max_frames() const
     
    344373}
    345374
    346 void md2_loader::load_indicies( std::vector<uint16>& idx )
     375void md2_loader::load_indicies( std::vector<uint32>& idx )
    347376{
    348377        idx.assign( m_new_indexes.begin(), m_new_indexes.end() );
Note: See TracChangeset for help on using the changeset viewer.