Hi Boto, On Mon, Aug 11, 2008 at 9:42 PM, Botorabi <[EMAIL PROTECTED]> wrote:
> hi Serge and Jean-Sébastien, > > if i got you right, you suggest to implement a kind of proxy plugin > associated with a particular file extension which would make use of existing > plugins in order to load different file formats. > > certainly, you are right. it is one possibility. however i feel that it is > not general enough. it would be nice not to touch any file extensions, > instead let the api user interfere in fetching the data from physical > medium. for instance the plugin for getting data from remote machines via a > network protocol does internally something similar, i.e. it does not fetch > the data from local hard disk, but uses a network protocol. > > i think a cleaner approach would be a mechanism for accessing data during > plugins read and write data. thus (Serge) you would not need to write an own > plugin for accessing sql data, but just interfere in your application in the > operation of accessing the data. so imagine you use the osgDB method for > reading a node and the node is read from sql database instead of a local > hard disk. so you would be able to read any supported file type from your > sql database, e.g. osg, ive, obj, image files, etc. for directing the > read/write operation to a sql database one could use the options object. in > your application you would have a callback where you check the option and > either forward the file operation to current implemented mechanisms or you > handle the file operation yourself (e.g. read/write from/to sql database). > > I am already able to read any type of data from SQL databases with this system. But now I better understand what you want, it's true that the http protocol support is a sort of workaround specially made for it, it would be nice to make this system more general to be able to register any protocols (like FTP, SQL...). But currently you'll still be limited with the plugins implementing reading from a stream, to make it work for everyone, you'll need to make changes to the API and defer the file opening part into the core and only work with streams into the plugins. -- Serge Lages http://www.tharsis-software.com
_______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

