I still haven't come up with a solution to dynamically loading loaders, but I have come across a new issue.

The loader I am writing is using an external proprietary API. ie. I have no source code and no control of the API. The issue I am facing is that the external API does not support streams, it only supports loading from a file name as a char*. Since it seems that the readFile API for osg::SceneFileType is deprecated, I am at a little bit of a loss as to what to do. From what I understand of the SceneFileType API it looks like the read method takes 2 arguments: 1. istream of data 2. filename or extension. I could just assume that the 2nd param will always contain the filename and ignore the stream, but this seems a little fragile. I know that this will definitely break support for gziped files since that uses an ultra cool stream adapter, but will it break anything else in how OpenSG assumes the file loaders work?

It seems that this would be something that others have probably faced when interfacing with existing loader libraries (especially C-based ones that would have no concept of streams). What have other people done in this situation?

Thanks,
Allen


-------------------------------------------------------
SF.Net email is sponsored by: GoToMeeting - the easiest way to collaborate
online with coworkers and clients while avoiding the high cost of travel and
communications. There is no equipment to buy and you can meet as often as
you want. Try it free.http://ads.osdn.com/?ad_id=7402&alloc_id=16135&op=click
_______________________________________________
Opensg-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/opensg-users

Reply via email to