[fluxus] GLSL
Dave Griffiths
dave at pawfal.org
Tue May 30 08:00:22 PDT 2006
... GLSL shader support to head
scons GLSL=1
needs an OpenGL2 compatible card/driver and a new library dependancy:
http://glew.sourceforge.net/
new functions:
(shader vertshader fragshader)
loads the vertexshader and fragment shader on to current state or grabbed
primitive
(shader-set! paramlist)
sets uniform parameters for the shader in a token, value list, eg:
(list "specular" 0.5 "mycolour" (vector 1 0 0))
shaders also get given all pdata as attribute parameters, so you can
control them per-vertex from your Scheme scripts
fluxus compiles the shaders every time you call shader at the moment, this
means you can livecode them from the fluxus editor ;)
the obligitory screen shot:
a per fragment point lighting shader:
http://www.pawfal.org/Software/fluxus/images/glsl.png
the same script with the shader commented out, which uses the standard gl
per vertex gouraud shading:
http://www.pawfal.org/Software/fluxus/images/non-glsl.png
cheers,
dave
More information about the Fluxus
mailing list