Displaying dae files in openGL

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.
Thanks

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 that has all kinds of 3d file formats that it loads – see Article on Irrlicht which states it can load .dae files.

To see it power check out the example scenes

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


	device=createDevice(video::EDT_OPENGL,
		dimension2d<s32>(640,480),16,false,true);

with


	device=createDevice(video::EDT_OPENGL,
		dimension2d<u32>(640,480),16,false,true);

ie s32 → u32

Also you can delete the line


#include "unistd.h"

since it is not being used at all here