Ignore:
Timestamp:
05/16/15 17:40:16 (10 years ago)
Author:
epyon
Message:
  • overhaul of logging: no longer stream operated no longer using STL no memory allocation shorthand macros fast file and console I/O
Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk

    • Property svn:global-ignores set to
      vs2012
      vs2013
      gmake
      gmake-clang
  • trunk/src/formats/assimp_loader.cc

    r332 r365  
    8989        m_scene = nullptr;
    9090        m_mesh_count = 0;
    91         NV_LOG( nv::LOG_NOTICE, "AssImp loading file..." );
     91        NV_LOG_NOTICE( "AssImp loading file..." );
    9292        size_t size = source.size();
    9393        char* data  = new char[ size ];
     
    9797        if( !scene)
    9898        {
    99                 NV_LOG( nv::LOG_ERROR, aiGetErrorString() );
     99                NV_LOG_ERROR( aiGetErrorString() );
    100100                return false;
    101101        }
    102102        m_scene      = scene;
    103103        m_mesh_count = scene->mNumMeshes;
    104         NV_LOG( nv::LOG_NOTICE, "Loading successfull" );
     104        NV_LOG_NOTICE( "Loading successfull" );
    105105        return true;
    106106}
     
    213213        if ( scene == nullptr ) return;
    214214
    215         NV_LOG( nv::LOG_NOTICE, "------------------------" );
    216         NV_LOG( nv::LOG_NOTICE, "Texture   count - " << scene->mNumTextures );
    217         NV_LOG( nv::LOG_NOTICE, "Animation count - " << scene->mNumAnimations );
    218         NV_LOG( nv::LOG_NOTICE, "Material  count - " << scene->mNumMaterials );
    219         NV_LOG( nv::LOG_NOTICE, "Meshes    count - " << scene->mNumMeshes );
    220         NV_LOG( nv::LOG_NOTICE, "------------------------" );
     215        NV_LOG_NOTICE( "------------------------" );
     216        NV_LOG_NOTICE( "Texture   count - ", scene->mNumTextures );
     217        NV_LOG_NOTICE( "Animation count - ", scene->mNumAnimations );
     218        NV_LOG_NOTICE( "Material  count - ", scene->mNumMaterials );
     219        NV_LOG_NOTICE( "Meshes    count - ", scene->mNumMeshes );
     220        NV_LOG_NOTICE( "------------------------" );
    221221
    222222        aiNode* root = scene->mRootNode;
    223223        if (root)
    224224        {
    225                 NV_LOG( nv::LOG_NOTICE, "Root node  - " << root->mName.data );
    226                 NV_LOG( nv::LOG_NOTICE, "  meshes   - " << root->mNumMeshes );
    227                 NV_LOG( nv::LOG_NOTICE, "  children - " << root->mNumChildren );
     225                NV_LOG_NOTICE( "Root node  - ", root->mName.data );
     226                NV_LOG_NOTICE( "  meshes   - ", root->mNumMeshes );
     227                NV_LOG_NOTICE( "  children - ", root->mNumChildren );
    228228        }
    229229        else
    230230        {
    231                 NV_LOG( nv::LOG_NOTICE, "No root node!" );
    232         }
    233         NV_LOG( nv::LOG_NOTICE, "------------------------" );
     231                NV_LOG_NOTICE( "No root node!" );
     232        }
     233        NV_LOG_NOTICE( "------------------------" );
    234234
    235235        if ( scene->mNumMeshes > 0 )
     
    239239                        aiMesh* mesh = scene->mMeshes[mc];
    240240
    241                         NV_LOG( nv::LOG_NOTICE, "Mesh #"<<mc<<"   - " << std::string( mesh->mName.data ) );
    242                         NV_LOG( nv::LOG_NOTICE, "  bones   - " << mesh->mNumBones );
    243                         NV_LOG( nv::LOG_NOTICE, "  uvs     - " << mesh->mNumUVComponents[0] );
    244                         NV_LOG( nv::LOG_NOTICE, "  verts   - " << mesh->mNumVertices );
    245                         NV_LOG( nv::LOG_NOTICE, "  faces   - " << mesh->mNumFaces );
    246 
    247                         //                      NV_LOG( nv::LOG_NOTICE, "Bones:" );
     241                        NV_LOG_NOTICE( "Mesh #", mc, "   - ", std::string( mesh->mName.data ) );
     242                        NV_LOG_NOTICE( "  bones   - ", mesh->mNumBones );
     243                        NV_LOG_NOTICE( "  uvs     - ", mesh->mNumUVComponents[0] );
     244                        NV_LOG_NOTICE( "  verts   - ", mesh->mNumVertices );
     245                        NV_LOG_NOTICE( "  faces   - ", mesh->mNumFaces );
     246
     247                        //                      NV_LOG_NOTICE( "Bones:" );
    248248                        //                      for (unsigned int m=0; m<mesh->mNumBones; m++)
    249249                        //                      {
    250250                        //                              aiBone* bone  = mesh->mBones[m];
    251                         //                              NV_LOG( nv::LOG_DEBUG, bone->mName.C_Str() );
     251                        //                              NV_LOG_NOTICE( bone->mName.C_Str() );
    252252                        //                      }
    253253                }
     
    255255        else
    256256        {
    257                 NV_LOG( nv::LOG_NOTICE, "No meshes!" );
    258         }
    259         NV_LOG( nv::LOG_NOTICE, "------------------------" );
     257                NV_LOG_NOTICE( "No meshes!" );
     258        }
     259        NV_LOG_NOTICE( "------------------------" );
    260260
    261261
     
    270270        //                      {
    271271        //                              texFound = scene->mMaterials[m]->GetTexture(aiTextureType_DIFFUSE, texIndex, &path);
    272         //                              NV_LOG( nv::LOG_NOTICE, "  material - " << path.data );
     272        //                              NV_LOG_NOTICE( "  material - ", path.data );
    273273        //                              texIndex++;
    274274        //                      }
     
    277277        //      else
    278278        //      {
    279         //              NV_LOG( nv::LOG_NOTICE, "No materials" );
     279        //              NV_LOG_NOTICE( "No materials" );
    280280        //      }
    281         //      NV_LOG( nv::LOG_NOTICE, "------------------------" );
     281        //      NV_LOG_NOTICE( "------------------------" );
    282282
    283283}
Note: See TracChangeset for help on using the changeset viewer.