Browse Source

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


Former-commit-id: 4b1c1b6a2686818b05a7f6c908354dc468481a6b

Daniele Panozzo 9 năm trước cách đây
mục cha
commit
2e44825c2b
2 tập tin đã thay đổi với 4 bổ sung0 xóa
  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})