Browse Source

Fixed load_mesh for obj

Kevin De Keyser 5 years ago
parent
commit
14d6bcec3d
1 changed files with 4 additions and 2 deletions
  1. 4 2
      include/igl/opengl/glfw/Viewer.cpp

+ 4 - 2
include/igl/opengl/glfw/Viewer.cpp

@@ -432,8 +432,10 @@ namespace glfw
       }
       }
 
 
       data().set_mesh(V,F);
       data().set_mesh(V,F);
-      data().set_uv(UV_V,UV_F);
-
+      if(!UV_V.rows() != 0 && UV_F.rows() != 0)
+      {
+        data().set_uv(UV_V,UV_F);
+      }
     }
     }
     else
     else
     {
     {