On Tue, 2007-05-08 at 00:03 +0400, Vladimir Shabanov wrote: > 2007/5/7, Jan Ciger <[EMAIL PROTECTED]>: > > Vladimir Shabanov wrote: > > > * unix tool `sed' for converting *.glsl into shaders/*.h files (It > > > would be good if this step will be configurable, i.e. end users use > > > generated shaders/*.h files, while developers have an option to > > > regenerate them when source .glsl is changed (as it is in current > > > makefile)). > > > > I think that an even better option would be to simply load the shaders > > on the fly from the text file. Why do they need to be hard-compiled into > > the code? I think that the sed dependency and the associated messy > > scripting more than outweigh any benefit this could have. > > I think that external files are more maintenance pain that hard-coded > shaders. It's simpler to have one library than the library + 2 shader > files with obscure location. Also current two shader files are really > many more shader files since conditional compilation is used (look at > those "#ifdef"s). Current approach with using `sed' simplifies > creating different shaders depending on material parameters. When > using external files I must do conditional compilation by hand (not > sure that OpenGL allows to define preprocessor defines). So I think > that using generated files plus option to regenerate them for > developers would be better solution.
I can't say I agree with this at all. If you must, have a directory layout of shaders in an archive of some such and load them from there... you could even build a shader buffer internally based on various criteria during runtime. Integrating sed w/ source, however, and then trying to modularize that code as a useful, reusable library just doesn't fit with my personal opinion of what OSG is now and will hopefully continue to be. Something about it just "feels" wrong... Then again, I'm a small fish in a big ocean, and my opinion means very little. :) It's great to see activity, at any rate... :) > _______________________________________________ > osg-users mailing list > [email protected] > http://openscenegraph.net/mailman/listinfo/osg-users > http://www.openscenegraph.org/ > _______________________________________________ osg-users mailing list [email protected] http://openscenegraph.net/mailman/listinfo/osg-users http://www.openscenegraph.org/
