[osg-users] Strange problem with QT, OSG and osgdb_dae.so

Philipp Meyer philipp.meyer at fh-bielefeld.de
Tue Aug 9 03:41:42 PDT 2016


Im trying to build a collada model viewer using osg, the osgdb_dae plugin and QT for the user interface.

For integrating osg into QT, I have followed the example implementation here:

I can see the graphics window, I'm able to change the clear color of it and I also successfully created some basic shapes and used shaders.

However, when loading a collada file using the osgDB and osg_dae plugin, I get very weird results. For example, when loading a car model, I only see a flat rectangle. I have written my whole scene graph into a file to debug it, and it seems like it loaded the model correctly, however, all vertices are set to 0 0 0 instead of their proper values.

To make sure I did not build the library incorrectly I also created another program without QT and the exact same source code for loading the model, and it works perfectly.

I have experimented further, and it appears that the call to


QApplication(argc, argv); 

prior to loading the collada model is causing the issue. When removing the qt initialization, everything works fine.

So, it seems like QT is messing with some openGL stuff in the background? I still dont really get why that would mess up the collada loader though.
Does anyone have an idea what the issue could be?

Thank you!


Read this topic online here:

More information about the osg-users mailing list