Hi,

I need to do some special things when some files are loaded and written so I'm 
using 
osgDB::Registry::{Read,Write}FileCallback - so far all good. There are some
common functionality in the code I don't want to repeat, so the callback stuff 
is put into one class. 

This causes problems with osg beacuse when MyCallback inherits from both 
ReadFileCallback 
and WriteFileCallback there 'll be two osg::Referenced. If normal pointers are 
used, one
can get the code that uses MyCallback to compile, but crashes are bound to 
happen... 
If ref_ptr<MyCallback> is used, the compiler find the problem.

>From this I suggest that both osgDB::Registry::{Read,Write}FileCallback use 
>virtual 
inheritance from osg::Referenced.

Or if there is any good reason not to put all the callback stuff in the same 
class I'd
be happy to hear about it.

/ Mattias






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

Reply via email to