Hi Heiko, I solved the problem this way:
1. Create an own subclass of osgDB::ReadFileCallback and override the readImage method. 2. Check inside the readImage() method, if the filename starts with ":/" or "qrc:///" 3. If the filename is a Qt resource, then load the image into a QImage and convert it to an osg::Image. 4. Call osgDB::Registry::instance()->setReadFileCallback() with a new instance of your own osgDB::ReadFileCallback from step 1. Now you should be able to load Qt resources by calling osgDB::readImageFile(":/Test/Test.jpg") etc. Best regards, André 2014-09-11 16:51 GMT+02:00 Heiko Thiel <osgfo...@tevs.eu>: > Hi, > > I currently bind files wich our application need as resource. But is there > a way, that osg automatically use the resource system (accept filepathes > starting with qrc:/). Or how I can load a file from a qrc with something > like readImageFile, where a filepathes is accepted, but I don't see an > alternate with a stream? > > Thank you! > > Cheers, > Heiko > > ------------------ > Read this topic online here: > http://forum.openscenegraph.org/viewtopic.php?p=61020#61020 > > > > > > _______________________________________________ > osg-users mailing list > osg-users@lists.openscenegraph.org > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org >
_______________________________________________ osg-users mailing list osg-users@lists.openscenegraph.org http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org