Hi Mike,
> Should ReaderWriter should somehow preserve the > representation between > reading and possible future rewriting, or should it > always expect an > explicit option? To preserve backwards compatibility I would say that the Writer should embed the code into .osg directly. Only if user passes specified options the writer writes only the filename of the stored shader source. > What filename should be stored in > the written .osg > file (the source filename is not preserved in the > osg::Shader)? As it is done for the Images, the filename should be also stored in the osg::Shader class. This name is used then in .osg file. > Should > the shader source files themselves also be rewritten > (perhaps the shader > was modified)? I think per default not, since it is mostly unnatural to change the shader source in the program during the runtime. However if the Shader is created on the fly during the execution time, then it should be written to the file, of course. > > I agree it would be nice to expose the option to use > a filename > reference; due to all the issues, I just defaulted > to the safest path. I see, but I think we should still stay by the safest path, however provide the user with the possibility to shift the shader sources to external files manually. > Currently when I want a filename reference, I > manually edit the .osg > file; not a good answer, but it works. I know, this is the way how I also would do this ;-) Best regards, Art > cheers > -- mew > > > > > -----Original Message----- > > From: [EMAIL PROTECTED] > [mailto:osg-users- > > [EMAIL PROTECTED] On Behalf Of Art > Tevs > > Sent: Wednesday, January 23, 2008 10:31 AM > > To: OpenSceneGraph Users > > Subject: [osg-users] Texture/Shader inlined output > to .osg files > > > > Hello, > > > > If one writes a texture to the .osg file, then the > > texture is not inlined, but it's file path is > written > > to the .osg file. > > > > I am wonder why the same doesn't happen to shader > > programs. The shaders are inlined into the .osg > file. > > As from my point of view shader programs are also > > resources, which might be changed without changing > the > > .osg file and hence be loaded differently on the > next > > app start. > > > > Would it be make sense to provide a patch which do > > either inline the shader code or write a file path > of > > the file from where the shader code was retrieved. > > This should be somehow defined through the Options > > object given to the reader. > > > > What do you think? > > > > Best, > > Art > > > > P.S. I looked into the code and encountered that > > reading of shaders from files is already supported > but > > writing not. > > > > > > > > > > Machen Sie Yahoo! zu Ihrer Startseite. Los > geht's: > > http://de.yahoo.com/set > > _______________________________________________ > > osg-users mailing list > > [email protected] > > > http://lists.openscenegraph.org/listinfo.cgi/osg-users- > > openscenegraph.org > _______________________________________________ > osg-users mailing list > [email protected] > http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org > Heute schon einen Blick in die Zukunft von E-Mails wagen? Versuchen Sie“s mit dem neuen Yahoo! Mail. www.yahoo.de/mail _______________________________________________ osg-users mailing list [email protected] http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

