diff --git a/CMakeModules/FindFBX.cmake b/CMakeModules/FindFBX.cmake index 687735687..c70ed70ed 100644 --- a/CMakeModules/FindFBX.cmake +++ b/CMakeModules/FindFBX.cmake @@ -20,8 +20,10 @@ ELSEIF(MSVC10) SET(FBX_LIBDIR "vs2010") ELSEIF(MSVC11) SET(FBX_LIBDIR "vs2012") -ELSEIF(MSVC12 OR MSVC_VERSION>1800) +ELSEIF(MSVC12 OR MSVC_VERSION==1800) SET(FBX_LIBDIR "vs2013") +ELSEIF(MSVC14 OR MSVC_VERSION>1900) + SET(FBX_LIBDIR "vs2015") ENDIF() IF(APPLE) @@ -48,6 +50,8 @@ SET(FBX_LIBNAME_DEBUG ${FBX_LIBNAME}d) SET( FBX_SEARCH_PATHS $ENV{FBX_DIR} + "$ENV{ProgramW6432}/Autodesk/FBX/FBX SDK/2016.1.1" + "$ENV{PROGRAMFILES}/Autodesk/FBX/FBX SDK/2016.1.1" "$ENV{ProgramW6432}/Autodesk/FBX/FBX SDK/2015.1" "$ENV{PROGRAMFILES}/Autodesk/FBX/FBX SDK/2015.1" "/Applications/Autodesk/FBX/FBX SDK/2015.1" diff --git a/src/osgPlugins/fbx/WriterCompareTriangle.cpp b/src/osgPlugins/fbx/WriterCompareTriangle.cpp index 686abc8d9..5638d1e22 100644 --- a/src/osgPlugins/fbx/WriterCompareTriangle.cpp +++ b/src/osgPlugins/fbx/WriterCompareTriangle.cpp @@ -20,8 +20,8 @@ WriterCompareTriangle::operator()(const std::pair& t1, if (t1.second != t2.second) { - const osg::Geometry* g = geode.getDrawable( t2.second )->asGeometry(); - vecs = static_cast(g->getVertexArray()); + const osg::Geometry* g2 = geode.getDrawable( t2.second )->asGeometry(); + vecs = static_cast(g2->getVertexArray()); } const osg::Vec3::value_type x2 = (*vecs)[t2.first.t1].x(); const osg::Vec3::value_type y2 = (*vecs)[t2.first.t1].y();