I want to load a 3D model into an opengl scene. For this I've read about the .obj format and how the vertex cord's and etc are stored. I want to parse this file, but have completely no idea what soever how to begin with. After going through couple of sample codes i got the idea that the parser is Model intensive. I'll be thankful if you could help me out with how to store and manipulate various parameters in the .obj and .mtl file.

You could use the old C way with fopen() and fread() to parse each line, it's not too difficult.

Also, check out this demo for .obj loading and rendering with OpenGL: http://www.dhpoware.com/demos/glObjViewer.html - perhaps you could derive your own version from this.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.