On Dec 9, 2005, at 11:19 AM, Frank Barknecht wrote:
*However*: I now have a working patch, it's attached and was extended to also incorporate the attenuation/cutoff/decay messages. It works with current Gem-CVS, only the debug-cone is slightly wrong of course. It would be nice, if that cone would also display the cutoff-angle btw.
...I've fixed the debug-cone problem: [spot_light] was initializing
to the wrong direction vector...also added checks to the light params
so that they don't cause gl to throw errors for out of range:
glerrors are silent, and at best just cause the calling function to
be ignored, but at worst they can screw up glstate and user
expectations...
...according to the spec:
linearAttenuation should be positive spotCutoff should be 0-90 or 180 ("special value") spotExponent should be 0-128
[spot_light] allows for some really nice effects btw, for example if you crank up the colors to "out of range" values like [2 3 0(, then it gives a surreal feel.
...yeh, neat kinda saturation along the edges...I've attached a
modified version of your help patch to work with the new, correct,
initial direction, and will commit it to cvs later when it's
prettified ;-)
james