Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>Using blender to save your models as obj files is a great way to go, imo. OpenGL doesn't, to my knowledge, have any pre-built functionality or preference for certain file formats. You'll likely have to make your own parser to load the vertex data or, if you'd prefer, you can use one of the many .obj loaders others have written and posted online. I would recommend writing your own loader, however. It's fun and you'll learn a lot. Obj files are pretty easy, too. <a href="http://blogs.oreilly.com/iphone/2008/12/wave-front-obj-file-loader-for.html" rel="nofollow">This</a> might be a good starting point, if you just want to adapt pre-written code.</p> <p>If you're still exploring 3D file formats though, I would recommend looking into <a href="https://collada.org/mediawiki/index.php/COLLADA_-_Digital_Asset_and_FX_Exchange_Schema" rel="nofollow">Collada.</a> It's an XML format and supports textures, vert weights, and even animations. There's also a <a href="http://colladablender.illusoft.com/cms/" rel="nofollow">plug-in</a> available for blender. On the downside, it's a bit harder to find pre-made loaders out there and making your own takes a leap in difficulty from obj files. Sifting through <a href="http://sourceforge.net/projects/collada-dom/files/Collada%20DOM/2.1/" rel="nofollow">Collada DOM</a> should help get you well on your way, however, as it includes sample code for an OpenGL viewer and effects loader. <a href="http://www.khronos.org/collada/faq/" rel="nofollow">The Khronos faq</a> might get you started if you have tons of questions about the format. </p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload