Changeset 280 for trunk/src/formats


Ignore:
Timestamp:
07/08/14 18:29:24 (11 years ago)
Author:
epyon
Message:
  • unified mesh_raw_channel and mesh_raw_index_channel
  • string_table cleaned up and implementation of creator split into a cc file
Location:
trunk/src/formats
Files:
5 edited

Legend:

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

    r279 r280  
    143143        }
    144144
    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 );
    147147        uint16* indices = (uint16*)ichannel->data;
    148148        for (unsigned int i=0; i<mesh->mNumFaces; i++)
     
    294294                {
    295295                        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!" );
    297298                        assimp_skinned_vtx* va = (assimp_skinned_vtx*)channel->data;
    298299                        for ( unsigned v = 0; v < channel->count; ++v )
  • trunk/src/formats/md2_loader.cc

    r240 r280  
    359359        }
    360360
    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() );
    362362        if ( m_new_indexes.size() > 0 )
    363363        {
     
    369369        result->add_channel( mc_pn );
    370370        result->add_channel( mc_t );
    371         result->set_index_channel( ic );
     371        result->add_channel( ic );
    372372        return result;
    373373}
  • trunk/src/formats/md3_loader.cc

    r241 r280  
    377377        index = 0;
    378378        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 );
    380380        uint16* icp = (uint16*)ic->data;
    381381        for ( sint32 i = 0; i < num_surfaces; ++i )
     
    396396        result->add_channel( mc_pn );
    397397        result->add_channel( mc_t );
    398         result->set_index_channel( ic );
     398        result->add_channel( ic );
    399399        return result;
    400400}
  • trunk/src/formats/md5_loader.cc

    r261 r280  
    145145                                        sstream >> num_tris;
    146146
    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 );
    148148                                        uint32* vtx_i                = (uint32*)ch_i->data;
    149149                                        mesh->m_idata                = vtx_i;
    150150                                        uint32 idx = 0;
    151                                         mesh->set_index_channel( ch_i );
     151                                        mesh->add_channel( ch_i );
    152152
    153153                                        next_line( sstream );
  • trunk/src/formats/obj_loader.cc

    r240 r280  
    334334                channel->desc  = m_descriptor;
    335335                channel->count = reader->size * 3;
    336                 channel->size  = reader->raw_size();
    337336
    338337                mesh_data* mesh = new mesh_data();
Note: See TracChangeset for help on using the changeset viewer.