浏览代码

Merge branch 'master' of github.com:libigl/libigl into alecjacobson

Former-commit-id: 31deefb44d207b3dedf106c22818b6e2d81bebb1
Alec Jacobson 8 年之前
父节点
当前提交
5985920c44
共有 2 个文件被更改,包括 10 次插入7 次删除
  1. 1 0
      include/igl/list_to_matrix.cpp
  2. 9 7
      include/igl/viewer/Viewer.cpp

+ 1 - 0
include/igl/list_to_matrix.cpp

@@ -161,5 +161,6 @@ template bool igl::list_to_matrix<double, Eigen::Matrix<double, -1, -1, 0, -1, -
 template bool igl::list_to_matrix<double, Eigen::Matrix<double, -1, -1, 0, -1, -1> >(std::vector<double, std::allocator<double> > const&, Eigen::PlainObjectBase<Eigen::Matrix<double, -1, -1, 0, -1, -1> >&);
 template bool igl::list_to_matrix<double, Eigen::Matrix<double, -1, -1, 0, -1, -1> >(std::vector<double, std::allocator<double> > const&, Eigen::PlainObjectBase<Eigen::Matrix<double, -1, -1, 0, -1, -1> >&);
 template bool igl::list_to_matrix<unsigned long, Eigen::Matrix<int, -1, -1, 0, -1, -1> >(std::vector<unsigned long, std::allocator<unsigned long> > const&, Eigen::PlainObjectBase<Eigen::Matrix<int, -1, -1, 0, -1, -1> >&);
 template bool igl::list_to_matrix<unsigned long, Eigen::Matrix<int, -1, -1, 0, -1, -1> >(std::vector<unsigned long, std::allocator<unsigned long> > const&, Eigen::PlainObjectBase<Eigen::Matrix<int, -1, -1, 0, -1, -1> >&);
 template bool igl::list_to_matrix<unsigned __int64, class Eigen::Matrix<int, -1, -1, 0, -1, -1> >(class std::vector<unsigned __int64, class std::allocator<unsigned __int64> > const &, class Eigen::PlainObjectBase<class Eigen::Matrix<int, -1, -1, 0, -1, -1> > &);
 template bool igl::list_to_matrix<unsigned __int64, class Eigen::Matrix<int, -1, -1, 0, -1, -1> >(class std::vector<unsigned __int64, class std::allocator<unsigned __int64> > const &, class Eigen::PlainObjectBase<class Eigen::Matrix<int, -1, -1, 0, -1, -1> > &);
+template bool igl::list_to_matrix<unsigned __int64,class Eigen::Matrix<long,-1,1,0,-1,1> >(class std::vector<unsigned __int64,class std::allocator<unsigned __int64> > const &,class Eigen::PlainObjectBase<class Eigen::Matrix<long,-1,1,0,-1,1> > &);
 #endif
 #endif
 #endif
 #endif

+ 9 - 7
include/igl/viewer/Viewer.cpp

@@ -33,10 +33,13 @@
 
 
 #include <Eigen/LU>
 #include <Eigen/LU>
 
 
-#define GLFW_INCLUDE_GLU
-#ifndef _WIN32
-  #define GLFW_INCLUDE_GLCOREARB
+//#define GLFW_INCLUDE_GLU
+#if defined(__APPLE__)
+#define GLFW_INCLUDE_GLCOREARB
+#else
+#define GL_GLEXT_PROTOTYPES
 #endif
 #endif
+
 #include <GLFW/glfw3.h>
 #include <GLFW/glfw3.h>
 
 
 #include <cmath>
 #include <cmath>
@@ -80,7 +83,6 @@ static igl::viewer::Viewer * __viewer;
 static double highdpi = 1;
 static double highdpi = 1;
 static double scroll_x = 0;
 static double scroll_x = 0;
 static double scroll_y = 0;
 static double scroll_y = 0;
-//static int global_KMod = 0;
 
 
 static void glfw_mouse_press(GLFWwindow* window, int button, int action, int modifier)
 static void glfw_mouse_press(GLFWwindow* window, int button, int action, int modifier)
 {
 {
@@ -779,8 +781,8 @@ namespace viewer
         break;
         break;
 
 
 #ifdef IGL_VIEWER_WITH_NANOGUI
 #ifdef IGL_VIEWER_WITH_NANOGUI
-    ngui->refresh();
-    screen->drawWidgets();
+	screen->drawContents();
+	screen->drawWidgets();
 #endif
 #endif
   }
   }
 
 
@@ -871,7 +873,7 @@ namespace viewer
 
 
     glfwWindowHint(GLFW_SAMPLES, 8);
     glfwWindowHint(GLFW_SAMPLES, 8);
     glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 3);
     glfwWindowHint(GLFW_CONTEXT_VERSION_MAJOR, 3);
-    glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 2);
+    glfwWindowHint(GLFW_CONTEXT_VERSION_MINOR, 3);
 
 
     #ifdef __APPLE__
     #ifdef __APPLE__
       glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE);
       glfwWindowHint(GLFW_OPENGL_PROFILE, GLFW_OPENGL_CORE_PROFILE);