Thanks Ivan!&nbsp;<div><br></div><div>If the Khronos group had the courage to make OpenGL 3.0 a complete redesign as DirectX 10 was, it would all be much easier wouldn&#39;t it?&nbsp;</div><div><div><br></div><div><br></div><div><div>
<div><div class="gmail_quote">On Fri, Dec 12, 2008 at 6:50 PM, Ivan Tomac <span dir="ltr">&lt;<a href="mailto:tomac@pacific.net.au">tomac@pacific.net.au</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
Hi David,<br>
<br>
Adding lighting in this way makes sense for the fixed function OpenGL pipeline but it is too restrictive and redundant for shaders.<br>
gl_LightSource was provided in GLSL for backwards compatibility, mostly for those who want to add shaders to their existing applications that use legacy OpenGL.<br>
<br>
With shaders, rather than rely on several fixed functions for lighting it is now possible to implement all kinds of different forms of lighting and the 8 light limitation of the fixed function pipeline is no longer there either.<br>

<br>
One final thing to note is that as of OpenGL 3.0, all lighting functions have been deprecated.<br>
<br>
Regards,<br><font color="#888888">
<br>
Ivan</font><div class="Ih2E3d"><br>
<br>
&gt;&gt; I&#39;m not sure if the maximum number of lights applies when using custom GPU<br>
&gt;&gt; shaders...<br>
&gt;&gt;<br>
&gt;<br>
&gt; I looked into this. An example shader application [1] used normal glLight*<br>
&gt; commands to set up the lighting. &nbsp;This tutorial [2] shows that shaders have<br>
&gt; access the light information via. the gl_LightSource array and have the<br>
&gt; option to use it or not. I can imagine someone defining unlimited light<br>
&gt; parameters with uniform variables in glsl if they really wanted to.<br>
&gt;<br>
&gt; [1] <a href="http://cs.anu.edu.au/Student/comp4610/2007/labs/gpu.html" target="_blank">http://cs.anu.edu.au/Student/comp4610/2007/labs/gpu.html</a><br>
&gt; [2] <a href="http://www.clockworkcoders.com/oglsl/tutorial5.htm" target="_blank">http://www.clockworkcoders.com/oglsl/tutorial5.htm</a><br>
&gt;<br>
&gt; David<br></div><div><div></div><div class="Wj3C7c">
_______________________________________________<br>
FieldTrip mailing list<br>
<a href="mailto:FieldTrip@haskell.org" target="_blank">FieldTrip@haskell.org</a><br>
<a href="http://www.haskell.org/mailman/listinfo/fieldtrip" target="_blank">http://www.haskell.org/mailman/listinfo/fieldtrip</a><br>
</div></div></blockquote></div><br></div></div></div></div>