Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Nov 21, 2018, 12:01:01 PM (6 years ago)
Author:
wiesep
Message:

Added error handling

File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/branches/shader_HS18/src/libraries/tools/Mesh.cc

    r12098 r12112  
    7575
    7676                unsigned short src, dest;
    77                 if (!this->entity_->getMesh()->suggestTangentVectorBuildParams(Ogre::VertexElementSemantic::VES_TANGENT, src, dest))
     77                try
    7878                {
    79                     orxout() << "Generate Tanget for \"" << meshsource << '"' << endl;
    80                     this->entity_->getMesh()->buildTangentVectors(Ogre::VertexElementSemantic::VES_TANGENT, src, dest);
    81                     // this version cleans mirrored and rotated UVs but requires quality models
    82                     // mesh->buildTangentVectors(VES_TANGENT, src, dest, true, true);
     79                    if (!this->entity_->getMesh()->suggestTangentVectorBuildParams(Ogre::VertexElementSemantic::VES_TANGENT, src, dest))
     80                    {
     81                        orxout() << "Generate Tanget for \"" << meshsource << '"' << endl;
     82                        this->entity_->getMesh()->buildTangentVectors(Ogre::VertexElementSemantic::VES_TANGENT, src, dest);
     83                        // this version cleans mirrored and rotated UVs but requires quality models
     84                        // mesh->buildTangentVectors(VES_TANGENT, src, dest, true, true);
     85                    }
     86                } catch (...)
     87                {
     88                    orxout(internal_warning) << "Couldn't generat tangets for \"" << meshsource << '"' << endl;
    8389                }
    8490
    85             }
    86             catch (...)
     91            } catch (...)
    8792            {
    8893                orxout(internal_error) << "Couldn't load mesh \"" << meshsource << '"' << endl;
Note: See TracChangeset for help on using the changeset viewer.