Эх сурвалжийг харах

fixed bug in quicklook

Former-commit-id: cbc0637ebb10c72fb31b6c9fa2aa62aa5a643e6c
Alec Jacobson (jalec 11 жил өмнө
parent
commit
f4ee805a31

+ 5 - 5
examples/quicklook-mesh/Makefile

@@ -2,10 +2,11 @@
 
 # Seems that we unfortunately must use llvm or else we get issues trying to
 # include the Foundation headers
-#CXX=llvm-g++
-#C=llvm-gcc
-CXX=clang
-C=clang
+%CXX=llvm-g++
+%C=llvm-gcc
+CXX=clang++-mp-3.4
+C=clang-mp-3.4
+CXXFLAGS += -stdlib=libc++ -std=c++11
 
 EIGEN=/opt/local/include/eigen3/
 EIGEN3_INC=-I$(EIGEN) -I$(EIGEN)/unsupported
@@ -37,7 +38,6 @@ install:
 #CFLAGS += -Wall -g -O0
 # openmp is unfortunately not supported by llvm
 CFLAGS += -O3 -Wall -DNDEBUG -Winvalid-pch -m64 -msse4.2
-CXXFLAGS += -stdlib=libc++ -std=c++11
 OBJCFLAGS += -O3 -Wall -DNDEBUG -Winvalid-pch -m64 -msse4.2
 
 CPP_FILES=$(wildcard src/*.cpp)

+ 2 - 0
examples/quicklook-mesh/src/render_to_buffer.cpp

@@ -74,6 +74,8 @@ void init_viewports()
   using namespace std;
   for(auto & vp : viewports)
   {
+    // Reset. I guess Mac is keeping global variables alive...
+    vp.camera = Camera();
     vp.camera.push_away(3.);
     vp.camera.dolly_zoom(10.-vp.camera.m_angle);
   }

+ 0 - 1
include/igl/per_face_normals.h

@@ -8,7 +8,6 @@
 #ifndef IGL_PER_FACE_NORMALS_H
 #define IGL_PER_FACE_NORMALS_H
 #include "igl_inline.h"
-#include <utility>
 #include <Eigen/Core>
 namespace igl
 {