Hi all,

I have an osg::Image wich I write to a file on disk.
I have to overwrite this same image several times in run time.
What I do Is call

osgDB::writeImageFile(img, path)

The first call the function succeeds, but all the other calls
it can't do it, because the loadLibrary function fails when tying
to load the bmp plugin.

I've been tracing the code and seems that there's another
registry instance in memory (loaded in the first writeImageFile call)
wich is causing the loadLibrary to fail.

the writeImageFile calls  Registry::instance()->writeImage(image,filename);

and the instance() generates a new Registry each time.
The instance function has a "bool erase = false" to erase generated 
instance after
the write operation, but I can't set it from writeImageFile call.

However, the osgDB::writeNodeFile works OK writing to a same file several
times along the app runtime.

Maybe storing a pointer to Registry::instance() at my app startup,
 and calling  registry_ptr->writeImage can solve temporarily the problem but
I think the function should behave the same as osgDB::writeNodeFile and 
that's
why I post this message.

Hope it helps!

 // Miguel Martinez Rodilla
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to