From 6cdb25a8c9f20a232c05a9caa7ce2e7053418867 Mon Sep 17 00:00:00 2001 From: Adham Zahran Date: Fri, 13 May 2016 10:57:51 +0200 Subject: [PATCH] updated the LoadOBJ usage documentation. the less than/greater than < > signs now appear in the github pages --- index.html | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/index.html b/index.html index 4a8e36f..5145f68 100644 --- a/index.html +++ b/index.html @@ -73,14 +73,12 @@

First, load your mesh from file, storing the shapes and materials separately.

std::string inputfile = "cornell_box.obj";
-std::vector shapes;
-std::vector materials;
+std::vector<tinyobj::shape_t> shapes;
+std::vector<tinyobj::material_t> materials;
+std::string err;
 
-std::string err = tinyobj::LoadObj(shapes, materials, inputfile.c_str());
-
-if (!err.empty()) {
-  std::cerr << err << std::endl;
-  exit(1);
+if(!tinyobj::LoadObj(shapes, materials, err, inputfile.c_str()))
+	std::cerr << err << std::endl;
 }
 
 std::cout << "# of shapes    : " << shapes.size() << std::endl;
@@ -153,4 +151,4 @@ std::cout << "# of materials : " << materials.size() << std::endl;
     
     
   
-
\ No newline at end of file
+