Merge pull request #78 from lordadamson/gh-pages

updated the LoadOBJ usage documentation. the less than/greater than <…
This commit is contained in:
Syoyo Fujita
2016-05-13 18:15:18 +09:00

View File

@@ -73,14 +73,12 @@
<p>First, load your mesh from file, storing the shapes and materials separately.</p> <p>First, load your mesh from file, storing the shapes and materials separately.</p>
<pre><code>std::string inputfile = "cornell_box.obj"; <pre><code>std::string inputfile = "cornell_box.obj";
std::vector<tinyobj::shape_t> shapes; std::vector&lt;tinyobj::shape_t&gt; shapes;
std::vector<tinyobj::material_t> materials; std::vector&lt;tinyobj::material_t&gt; materials;
std::string err;
std::string err = tinyobj::LoadObj(shapes, materials, inputfile.c_str()); if(!tinyobj::LoadObj(shapes, materials, err, inputfile.c_str()))
std::cerr << err << std::endl;
if (!err.empty()) {
std::cerr << err << std::endl;
exit(1);
} }
std::cout << "# of shapes : " << shapes.size() << std::endl; std::cout << "# of shapes : " << shapes.size() << std::endl;
@@ -153,4 +151,4 @@ std::cout << "# of materials : " << materials.size() << std::endl;
<!--[if !IE]><script>fixScale(document);</script><![endif]--> <!--[if !IE]><script>fixScale(document);</script><![endif]-->
</body> </body>
</html> </html>