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.
_______________________________________________
osg-users mailing list
osg-users@openscenegraph.net
http://openscenegraph.net/mailman/listinfo/osg-users
http://www.openscenegraph.org/

Reply via email to