View Full Version : Displaying dae files in openGL

10-02-2009, 11:01 AM
I have been playing around setting up my 3d game in openGL. I am at the point where I want to display 3d models. I was recommended to render .dae files. Am not sure, how to go about this..

I have been reading for sometime (mainly the specification) about dae files and I understand they are xml files. I also understand some of the concepts about data sink and data source, how data is organized in meshes, etc. But, am not sure how to proceed.

From what I understand, I need to parse the xml and store vertices/triangles in my own structures and feed openGL the same to render the model. Am I correct?

Can someone please point me in the right direction..

Also, is there a library available which parses the xml for me and returns all the triangles / geometry? If so, I can then work on translating them data structures to something that openGL would understand.

I would appreciate any help.

10-03-2009, 09:32 AM
I don't know how to deal with .dae files directly but I have read that there is an openGL scene crossplatform Linux/win/etc library called Irrlicht (http://irrlicht.sourceforge.net/) that has all kinds of 3d file formats that it loads -- see Article on Irrlicht (http://www.linuxjournal.com/article/10294) which states it can load .dae files.

To see it power check out the example scenes (http://irrlicht.sourceforge.net/screenshots.html)

One note on the example article above, it seems to be a little out of date with the latest Irrlichht version. You will need to replace one line




ie s32 -> u32

Also you can delete the line

#include "unistd.h"

since it is not being used at all here