Преглед изворни кода

fixed viewer crashed
fixed label font size


Former-commit-id: 4ca2682a3c09511d6d1a05880d2ea6589361351e

schuellc пре 10 година
родитељ
комит
48dee912e7
3 измењених фајлова са 1 додато и 17 уклоњено
  1. 1 1
      include/igl/viewer/TextRenderer.cpp
  2. 0 12
      include/igl/viewer/Viewer.cpp
  3. 0 4
      include/igl/viewer/Viewer.h

+ 1 - 1
include/igl/viewer/TextRenderer.cpp

@@ -70,7 +70,7 @@ using namespace std;
     Eigen::Vector3f coord = igl::project(Eigen::Vector3f(pos(0), pos(1), pos(2)),
     Eigen::Vector3f coord = igl::project(Eigen::Vector3f(pos(0), pos(1), pos(2)),
         view_matrix, proj_matrix, viewport);
         view_matrix, proj_matrix, viewport);
 
 
-    nvgFontSize(ctx, 8);
+    nvgFontSize(ctx, 16/mPixelRatio);
     nvgFontFace(ctx, "sans");
     nvgFontFace(ctx, "sans");
     nvgTextAlign(ctx, NVG_ALIGN_LEFT | NVG_ALIGN_MIDDLE);
     nvgTextAlign(ctx, NVG_ALIGN_LEFT | NVG_ALIGN_MIDDLE);
     nvgFillColor(ctx, nvgRGBA(10,10,250,255));
     nvgFillColor(ctx, nvgRGBA(10,10,250,255));

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

@@ -239,18 +239,6 @@ namespace viewer
         return;
         return;
 
 
     init_plugins();
     init_plugins();
-
-    // Parse command line arguments
-    bool isLoaded = false;
-    for(int i=1;i<argc;i++)
-    {
-      if(strcmp(argv[i],"-s")==0) {
-        std::cout << "load scene file: " << argv[i+1] << std::endl;
-        isLoaded = load_scene(argv[i+1]);
-        if(isLoaded == false)
-          std::cout << "file not found: " << argv[i+1] << std::endl;
-      }
-    }
   }
   }
 
 
   IGL_INLINE Viewer::Viewer()
   IGL_INLINE Viewer::Viewer()

+ 0 - 4
include/igl/viewer/Viewer.h

@@ -48,10 +48,6 @@ namespace viewer
     IGL_INLINE int launch(std::string filename = "",bool resizable = true,bool fullscreen = false);
     IGL_INLINE int launch(std::string filename = "",bool resizable = true,bool fullscreen = false);
     IGL_INLINE void init();
     IGL_INLINE void init();
 
 
-    // Stores command line arguments
-    int argc;
-    char **argv;
-
     // Stores all the viewing options
     // Stores all the viewing options
     ViewerCore core;
     ViewerCore core;