>> Saturday, September 10, 2011
When I first started working with COLLADA, the Khronos Group provided example code that demonstrated how COLLADA meshes could be rendered with OpenGL. But the source code for COLLADA RT seems to have disappeared, so I've coded my own. I've uploaded the C++ source files to a Google-hosted project here, and I've included an example application that renders a sphere. I've also written a Google knol that explains how the code works.
Simply put, the ColladaInterface class reads a COLLADA file and returns a data structure for each mesh in the scene. The COLLADA format is based on XML, so the class calls functions from the TinyXML toolset. ColladaInterface doesn't access all the information in the COLLADA file, so there's plenty of room for improvement.
At some point, I'll add a function that writes data to COLLADA files. But for the moment, I hope this will help developers who are interested in using COLLADA for digital asset storage.