Changeset 382 for trunk/src/formats


Ignore:
Timestamp:
06/01/15 20:39:35 (10 years ago)
Author:
epyon
Message:
  • massive C++11 update (upgrade to MSVC 2015)
  • array/dynamic_array - fully based on memory containers (will be moved) (in progress)
Location:
trunk/src/formats
Files:
2 edited

Legend:

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

    r380 r382  
    238238                        aiMesh* mesh = scene->mMeshes[mc];
    239239
    240                         NV_LOG_NOTICE( "Mesh #", mc, "   - ", std::string( mesh->mName.data ) );
     240                        NV_LOG_NOTICE( "Mesh #", mc, "   - ", string_ref( (char*)mesh->mName.data ) );
    241241                        NV_LOG_NOTICE( "  bones   - ", mesh->mNumBones );
    242242                        NV_LOG_NOTICE( "  uvs     - ", mesh->mNumUVComponents[0] );
  • trunk/src/formats/obj_loader.cc

    r376 r382  
    280280                for ( nv::size_t a = 0; a < count; ++a )
    281281                {
    282                         const vec3& n = m_data[a].normal;
    283                         const vec3& t = tan1[a];
    284                         if ( ! (t.x == 0.0f && t.y == 0.0f && t.z == 0.0f) )
     282                        const vec3& nv = m_data[a].normal;
     283                        const vec3& tv = tan1[a];
     284                        if ( ! (tv.x == 0.0f && tv.y == 0.0f && tv.z == 0.0f) )
    285285                        {
    286                                 m_data[a].tangent    = vec4( glm::normalize(t - n * glm::dot( n, t )), 0.0f );
    287                                 m_data[a].tangent[3] = (glm::dot(glm::cross(n, t), tan2[a]) < 0.0f) ? -1.0f : 1.0f;
     286                                m_data[a].tangent    = vec4( glm::normalize(tv - nv * glm::dot( nv, tv )), 0.0f );
     287                                m_data[a].tangent[3] = (glm::dot(glm::cross(nv, tv), tan2[a]) < 0.0f) ? -1.0f : 1.0f;
    288288                        }
    289289                }
Note: See TracChangeset for help on using the changeset viewer.