View Full Version : Model formats and OpenGL?

09-19-2000, 04:25 AM
What model formats can you use in openGL none? I have seen some that use quake etc. anyways Can you use DXF?

09-19-2000, 04:35 AM
Depending on how you look at ot, you can either use none formats, or all formats.

OpenGL doesn't support any loading of objects or anything. It's up to you to code the loader, and store the data in such format you can render them using OpenGL calls. You can load any format you like, but you have to know how the format works. Have a look at the major programming sites for this.

09-19-2000, 04:06 PM
have a look at

There I list 4 converters that can translate many know formats to OpenGL (C).

Antonio www.fatech.com/tech (http://www.fatech.com/tech)

09-19-2000, 10:22 PM
thanks I will check it out :]

Rob The Bloke
09-20-2000, 11:54 AM
If you really want to get into it (worthwhile in my humble opinion)

Try writing your own file format loader. Most of them are text files and to an extent fairly readable. The only real consideration is how you are going to store your data. (once you've got it working once, try rewriting it, sounds long winded, but what you'll have learnt from the first time will make it very easy the second time, and the code will inevitably be better laid out because you'll know a lot more about what you're trying to do)

Get hold of the file format description from somewhere like www.wotsit.org (http://www.wotsit.org) and see if it makes any sense. (very rewarding when you get it to work for the first time, a bain when you've written your tenth)

On a seperate note, look for a file format that will have as much info as you will require. DXF's are by far the simplest file format available, but the loader is one of the most complex to write. It only has verticies, so normals and texturing co-ords will have to be calculated by yourself. Finding a format with that stuff in already is definately a bonus.