浏览代码

fix for duplicate symbols in stbi
fix for uninitialized memory in nanogui


Former-commit-id: 4b1c1b6a2686818b05a7f6c908354dc468481a6b

Daniele Panozzo 9 年之前
父节点
当前提交
2e44825c2b
共有 2 个文件被更改,包括 4 次插入0 次删除
  1. 1 0
      include/igl/viewer/Viewer.cpp
  2. 3 0
      shared/cmake/CMakeLists.txt

+ 1 - 0
include/igl/viewer/Viewer.cpp

@@ -261,6 +261,7 @@ namespace viewer
     ngui->addVariable("Show vertex labels", core.show_vertid);
     ngui->addVariable("Show faces labels", core.show_faceid);
 
+    screen->setVisible(true);
     screen->performLayout();
 #endif
 

+ 3 - 0
shared/cmake/CMakeLists.txt

@@ -340,6 +340,9 @@ endif()
 
 ### Compile the png parts ###
 if(LIBIGL_WITH_PNG)
+  if(LIBIGL_WITH_VIEWER)
+    set(STBI_LOAD OFF CACHE BOOL " " FORCE)
+  endif()
   set(STB_IMAGE_DIR "${LIBIGL_EXTERNAL}/stb_image")
   add_subdirectory("${STB_IMAGE_DIR}" "stb_image")
   list(APPEND LIBIGL_INCLUDE_DIRS ${STB_IMAGE_DIR})