[Fluxus] lighting of build-polygons

gabor papp gabor.lists at mndl.hu
Thu Aug 13 21:39:53 PDT 2009


hi Kassen,

fluxus and opengl needs normals to calculate lighting. when you build 
your roof polygons. you also have to calculate the normals. try 
(recalc-normals). there's also a typo 'triangel-list instead of 
'triangle-list. you don't really need (hint-vertcols) and pdata-set! "c" 
either, since all vertices have the same colour. you could use (colour) 
in the state instead, which is simpler.

i am experiencing a strange thing with this script. if you rotate the 
scene with the mouse, it's blinking. is it also doing this for you? it 
might be a state leaking bug somewhere.

i could reproduce this behaviour in a simple script as well:

(clear)

(build-cube)

(with-primitive (build-plane)
	(translate (vector 1.5 0 0))
	(hint-vertcols))

best,
gabor





More information about the Fluxus mailing list