Hi Allen,
On Wed, 2005-05-25 at 10:22 -0500, Allen Bierbaum wrote:
> 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?
No, that is a valid assumption. It all depends on the user. Most apps
use the filename interface and ignore the stream (this includes the
SceneViewer). I would just try to open the filename and if that fails
print an error message explaining the reason.
> 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?
I'm not aware of other people using these kinds of libraries, so I'd
guess you're the first to have this problem.
HIH
Dirk
--
-- Dirk Reiners OpenSG Forum [EMAIL PROTECTED]
-- The OpenSG Open Source Scenegraph: http://www.opensg.org
-- Join the list at http://lists.sf.net/lists/listinfo/opensg-users
-------------------------------------------------------
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