summaryrefslogtreecommitdiffstats
path: root/doc/javadoc/net/java/joglutils/lighting/Light.html
diff options
context:
space:
mode:
Diffstat (limited to 'doc/javadoc/net/java/joglutils/lighting/Light.html')
-rw-r--r--doc/javadoc/net/java/joglutils/lighting/Light.html296
1 files changed, 246 insertions, 50 deletions
diff --git a/doc/javadoc/net/java/joglutils/lighting/Light.html b/doc/javadoc/net/java/joglutils/lighting/Light.html
index b174540..4765631 100644
--- a/doc/javadoc/net/java/joglutils/lighting/Light.html
+++ b/doc/javadoc/net/java/joglutils/lighting/Light.html
@@ -2,7 +2,7 @@
<!--NewPage-->
<HTML>
<HEAD>
-<!-- Generated by javadoc (build 1.5.0_06) on Thu Jul 27 17:37:08 CDT 2006 -->
+<!-- Generated by javadoc (build 1.5.0_06) on Thu Aug 17 01:51:17 CDT 2006 -->
<TITLE>
Light
</TITLE>
@@ -162,7 +162,7 @@ This class encapsulates the settings for an OpenGL light. It has two modes:
<TD><CODE><B><A HREF="../../../../net/java/joglutils/lighting/Light.html#apply(javax.media.opengl.GL)">apply</A></B>(javax.media.opengl.GL&nbsp;gl)</CODE>
<BR>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Applies the settings on this Light to the specified OpenGL context,
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Applies the settings on this Light to the specified OpenGL context,
using the light number stored in the Light.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
@@ -172,7 +172,7 @@ This class encapsulates the settings for an OpenGL light. It has two modes:
int&nbsp;lightNumber)</CODE>
<BR>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Applies the settings on this Light to the specified OpenGL context,
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Applies the settings on this Light to the specified OpenGL context,
using the requested light number.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
@@ -371,6 +371,30 @@ This class encapsulates the settings for an OpenGL light. It has two modes:
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
+<CODE>static&nbsp;void</CODE></FONT></TD>
+<TD><CODE><B><A HREF="../../../../net/java/joglutils/lighting/Light.html#initializePhongShader()">initializePhongShader</A></B>()</CODE>
+
+<BR>
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Initializes Phong shading mode for this Light (instead of the fixed functionality Gouraud shading) on the current OpenGL context.</TD>
+</TR>
+<TR BGCOLOR="white" CLASS="TableRowColor">
+<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
+<CODE>static&nbsp;void</CODE></FONT></TD>
+<TD><CODE><B><A HREF="../../../../net/java/joglutils/lighting/Light.html#initializePhongShader(javax.media.opengl.GL)">initializePhongShader</A></B>(javax.media.opengl.GL&nbsp;gl)</CODE>
+
+<BR>
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Initializes Phong shading mode for this Light (instead of the fixed functionality Gouraud shading).</TD>
+</TR>
+<TR BGCOLOR="white" CLASS="TableRowColor">
+<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
+<CODE>&nbsp;boolean</CODE></FONT></TD>
+<TD><CODE><B><A HREF="../../../../net/java/joglutils/lighting/Light.html#isAmbientPhongColorMaterial()">isAmbientPhongColorMaterial</A></B>()</CODE>
+
+<BR>
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Determines if color material is used for ambient in the Phong shader</TD>
+</TR>
+<TR BGCOLOR="white" CLASS="TableRowColor">
+<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../net/java/joglutils/lighting/Light.html#isAttached()">isAttached</A></B>()</CODE>
@@ -379,6 +403,22 @@ This class encapsulates the settings for an OpenGL light. It has two modes:
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
+<CODE>&nbsp;boolean</CODE></FONT></TD>
+<TD><CODE><B><A HREF="../../../../net/java/joglutils/lighting/Light.html#isDiffusePhongColorMaterial()">isDiffusePhongColorMaterial</A></B>()</CODE>
+
+<BR>
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Determines if color material is used for diffuse in the Phong shader</TD>
+</TR>
+<TR BGCOLOR="white" CLASS="TableRowColor">
+<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
+<CODE>&nbsp;boolean</CODE></FONT></TD>
+<TD><CODE><B><A HREF="../../../../net/java/joglutils/lighting/Light.html#isPhongShaded()">isPhongShaded</A></B>()</CODE>
+
+<BR>
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Tells if this Light is using Phong shading</TD>
+</TR>
+<TR BGCOLOR="white" CLASS="TableRowColor">
+<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../net/java/joglutils/lighting/Light.html#makeDirectional()">makeDirectional</A></B>()</CODE>
@@ -403,12 +443,28 @@ This class encapsulates the settings for an OpenGL light. It has two modes:
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
+<CODE>static&nbsp;void</CODE></FONT></TD>
+<TD><CODE><B><A HREF="../../../../net/java/joglutils/lighting/Light.html#removePhongShader()">removePhongShader</A></B>()</CODE>
+
+<BR>
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Removes the Phong Shader program from the current GL Context</TD>
+</TR>
+<TR BGCOLOR="white" CLASS="TableRowColor">
+<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
+<CODE>static&nbsp;void</CODE></FONT></TD>
+<TD><CODE><B><A HREF="../../../../net/java/joglutils/lighting/Light.html#removePhongShader(javax.media.opengl.GL)">removePhongShader</A></B>(javax.media.opengl.GL&nbsp;gl)</CODE>
+
+<BR>
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Removes the Phong Shader program from the specified GL Context</TD>
+</TR>
+<TR BGCOLOR="white" CLASS="TableRowColor">
+<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../net/java/joglutils/lighting/Light.html#retrieve()">retrieve</A></B>()</CODE>
<BR>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Reconfigure the settings for this Light from the state of the
- attached <CODE>GL</CODE> Context.</TD>
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Reconfigure the settings for this Light from the state of the attached
+ <CODE>GL</CODE> Context.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
@@ -416,7 +472,7 @@ This class encapsulates the settings for an OpenGL light. It has two modes:
<TD><CODE><B><A HREF="../../../../net/java/joglutils/lighting/Light.html#retrieve(javax.media.opengl.GL)">retrieve</A></B>(javax.media.opengl.GL&nbsp;gl)</CODE>
<BR>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Reconfigures the settings on this Light from the state of the specified
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Reconfigures the settings on this Light from the state of the specified
OpenGL context, using the light number stored in the Light.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
@@ -426,7 +482,7 @@ This class encapsulates the settings for an OpenGL light. It has two modes:
int&nbsp;lightNumber)</CODE>
<BR>
-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Reconfigures the settings on this Light from the state of the specified
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Reconfigures the settings on this Light from the state of the specified
OpenGL context, using the requested light number.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
@@ -514,6 +570,23 @@ This class encapsulates the settings for an OpenGL light. It has two modes:
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
+<TD><CODE><B><A HREF="../../../../net/java/joglutils/lighting/Light.html#setPhongColorMaterial(boolean, boolean)">setPhongColorMaterial</A></B>(boolean&nbsp;ambient,
+ boolean&nbsp;diffuse)</CODE>
+
+<BR>
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets whether or not the opengl color should be used for the phong color shader</TD>
+</TR>
+<TR BGCOLOR="white" CLASS="TableRowColor">
+<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
+<CODE>&nbsp;void</CODE></FONT></TD>
+<TD><CODE><B><A HREF="../../../../net/java/joglutils/lighting/Light.html#setPhongShaded(boolean)">setPhongShaded</A></B>(boolean&nbsp;usePhongShading)</CODE>
+
+<BR>
+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Sets if phong per-fragment shading (as opposed to fixed-functionality per-vertex shading) is to be used with this Light.</TD>
+</TR>
+<TR BGCOLOR="white" CLASS="TableRowColor">
+<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
+<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../net/java/joglutils/lighting/Light.html#setQuadraticAttenuation(float)">setQuadraticAttenuation</A></B>(float&nbsp;quadraticAttenuation)</CODE>
<BR>
@@ -605,8 +678,7 @@ public <B>Light</B>(javax.media.opengl.GL&nbsp;gl)
<DL>
<DT><B>Parameters:</B><DD><CODE>gl</CODE> - the OpenGL context to attach the light to
<DT><B>Throws:</B>
-<DD><CODE>sddm.lighting.LightingException</CODE> - if all lights in the specified OpenGL context are already attached. Light is detached from any OpenGL Context.
-<DD><CODE><A HREF="../../../../net/java/joglutils/lighting/LightingException.html" title="class in net.java.joglutils.lighting">LightingException</A></CODE></DL>
+<DD><CODE><A HREF="../../../../net/java/joglutils/lighting/LightingException.html" title="class in net.java.joglutils.lighting">LightingException</A></CODE> - if the light number is invalid or is already in use by another Light. Light is detached from any OpenGL Context.</DL>
</DL>
<HR>
@@ -622,8 +694,7 @@ public <B>Light</B>(javax.media.opengl.GL&nbsp;gl,
<DL>
<DT><B>Parameters:</B><DD><CODE>gl</CODE> - the OpenGL context to attach the light to<DD><CODE>lightNumber</CODE> - the light number to be used (must be on [0,7])
<DT><B>Throws:</B>
-<DD><CODE>sddm.lighting.LightingException</CODE> - if the light number is invalid or is already in use by another Light. Light is detached from any OpenGL Context.
-<DD><CODE><A HREF="../../../../net/java/joglutils/lighting/LightingException.html" title="class in net.java.joglutils.lighting">LightingException</A></CODE></DL>
+<DD><CODE><A HREF="../../../../net/java/joglutils/lighting/LightingException.html" title="class in net.java.joglutils.lighting">LightingException</A></CODE> - if the light number is invalid or is already in use by another Light. Light is detached from any OpenGL Context.</DL>
</DL>
<!-- ============ METHOD DETAIL ========== -->
@@ -691,8 +762,7 @@ public void <B>setLightNumber</B>(int&nbsp;lightNumber)
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>lightNumber</CODE> - the light number to apply to this Light (must be on [0,7])
<DT><B>Throws:</B>
-<DD><CODE>sddm.lighting.LightingException</CODE> - if the light number is invalid or is already in use by another Light object on the attached OpenGL Context. Light is detached from any OpenGL Context.
-<DD><CODE><A HREF="../../../../net/java/joglutils/lighting/LightingException.html" title="class in net.java.joglutils.lighting">LightingException</A></CODE></DL>
+<DD><CODE><A HREF="../../../../net/java/joglutils/lighting/LightingException.html" title="class in net.java.joglutils.lighting">LightingException</A></CODE> - in use by another Light object on the attached OpenGL Context. Light is detached from any OpenGL Context.</DL>
</DD>
</DL>
<HR>
@@ -708,8 +778,7 @@ public void <B>setLightID</B>(int&nbsp;lightID)
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>lightID</CODE> - the OpenGL light ID (must be of the GL_LIGHTn family)
<DT><B>Throws:</B>
-<DD><CODE>sddm.lighting.LightingException</CODE> - if the input is not a valid light or the light is in use by another Light on the attached OpenGL Context. Light is detached from any OpenGL Context.
-<DD><CODE><A HREF="../../../../net/java/joglutils/lighting/LightingException.html" title="class in net.java.joglutils.lighting">LightingException</A></CODE></DL>
+<DD><CODE><A HREF="../../../../net/java/joglutils/lighting/LightingException.html" title="class in net.java.joglutils.lighting">LightingException</A></CODE> - if the input is not a valid light or the light is in use by another Light on the attached OpenGL Context. Light is detached from any OpenGL Context.</DL>
</DD>
</DL>
<HR>
@@ -725,8 +794,7 @@ public void <B>setAttachedGL</B>(javax.media.opengl.GL&nbsp;gl)
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>gl</CODE> - the OpenGL context to attach this to
<DT><B>Throws:</B>
-<DD><CODE>sddm.lighting.LightingException</CODE> - if the specified context has no free lights. Light is detached from any OpenGL Context.
-<DD><CODE><A HREF="../../../../net/java/joglutils/lighting/LightingException.html" title="class in net.java.joglutils.lighting">LightingException</A></CODE></DL>
+<DD><CODE><A HREF="../../../../net/java/joglutils/lighting/LightingException.html" title="class in net.java.joglutils.lighting">LightingException</A></CODE> - if the specified context has no free lights. Light is detached from any OpenGL Context.</DL>
</DD>
</DL>
<HR>
@@ -777,7 +845,8 @@ apply</H3>
<PRE>
public void <B>apply</B>()</PRE>
<DL>
-<DD>Applies the settings on this Light to the attached <CODE>GL</CODE> Context.
+<DD>Applies the settings on this Light to the attached <CODE>GL</CODE> Context.
+ Note that this will not apply Phong Shader settings.
<P>
<DD><DL>
</DL>
@@ -790,8 +859,8 @@ retrieve</H3>
<PRE>
public void <B>retrieve</B>()</PRE>
<DL>
-<DD>Reconfigure the settings for this Light from the state of the
- attached <CODE>GL</CODE> Context.
+<DD>Reconfigure the settings for this Light from the state of the attached
+ <CODE>GL</CODE> Context. Note that this will not retrieve Phong Shader settings.
<P>
<DD><DL>
</DL>
@@ -831,14 +900,13 @@ apply</H3>
public void <B>apply</B>(javax.media.opengl.GL&nbsp;gl)
throws <A HREF="../../../../net/java/joglutils/lighting/LightingException.html" title="class in net.java.joglutils.lighting">LightingException</A></PRE>
<DL>
-<DD>Applies the settings on this Light to the specified OpenGL context,
- using the light number stored in the Light.
+<DD>Applies the settings on this Light to the specified OpenGL context,
+ using the light number stored in the Light. Note that this will not apply Phong Shader settings.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>gl</CODE> - the OpenGL context to use.
<DT><B>Throws:</B>
-<DD><CODE>sddm.lighting.LightingException</CODE> - if the light number stored in this Light is invalid on the specified context.
-<DD><CODE><A HREF="../../../../net/java/joglutils/lighting/LightingException.html" title="class in net.java.joglutils.lighting">LightingException</A></CODE></DL>
+<DD><CODE><A HREF="../../../../net/java/joglutils/lighting/LightingException.html" title="class in net.java.joglutils.lighting">LightingException</A></CODE> - if the light number stored in this Light is invalid on the specified context.</DL>
</DD>
</DL>
<HR>
@@ -849,14 +917,13 @@ retrieve</H3>
public void <B>retrieve</B>(javax.media.opengl.GL&nbsp;gl)
throws <A HREF="../../../../net/java/joglutils/lighting/LightingException.html" title="class in net.java.joglutils.lighting">LightingException</A></PRE>
<DL>
-<DD>Reconfigures the settings on this Light from the state of the specified
- OpenGL context, using the light number stored in the Light.
+<DD>Reconfigures the settings on this Light from the state of the specified
+ OpenGL context, using the light number stored in the Light. Note that this will not retrieve Phong Shader settings.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>gl</CODE> - the OpenGL context to use.
<DT><B>Throws:</B>
-<DD><CODE>sddm.lighting.LightingException</CODE> - if the light number stored in this Light is invalid on the specified context.
-<DD><CODE><A HREF="../../../../net/java/joglutils/lighting/LightingException.html" title="class in net.java.joglutils.lighting">LightingException</A></CODE></DL>
+<DD><CODE><A HREF="../../../../net/java/joglutils/lighting/LightingException.html" title="class in net.java.joglutils.lighting">LightingException</A></CODE> - if the light number stored in this Light is invalid on the specified context.</DL>
</DD>
</DL>
<HR>
@@ -872,8 +939,7 @@ public void <B>enable</B>(javax.media.opengl.GL&nbsp;gl)
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>gl</CODE> - the OpenGL context to use.
<DT><B>Throws:</B>
-<DD><CODE>sddm.lighting.LightingException</CODE> - if the light number stored in this Light is invalid on the specified context.
-<DD><CODE><A HREF="../../../../net/java/joglutils/lighting/LightingException.html" title="class in net.java.joglutils.lighting">LightingException</A></CODE></DL>
+<DD><CODE><A HREF="../../../../net/java/joglutils/lighting/LightingException.html" title="class in net.java.joglutils.lighting">LightingException</A></CODE> - if the light number stored in this Light is invalid on the specified context.</DL>
</DD>
</DL>
<HR>
@@ -889,8 +955,7 @@ public void <B>disable</B>(javax.media.opengl.GL&nbsp;gl)
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>gl</CODE> - the OpenGL context to use.
<DT><B>Throws:</B>
-<DD><CODE>sddm.lighting.LightingException</CODE> - if the light number stored in this Light is invalid on the specified context.
-<DD><CODE><A HREF="../../../../net/java/joglutils/lighting/LightingException.html" title="class in net.java.joglutils.lighting">LightingException</A></CODE></DL>
+<DD><CODE><A HREF="../../../../net/java/joglutils/lighting/LightingException.html" title="class in net.java.joglutils.lighting">LightingException</A></CODE> - if the light number stored in this Light is invalid on the specified context.</DL>
</DD>
</DL>
<HR>
@@ -902,14 +967,13 @@ public void <B>apply</B>(javax.media.opengl.GL&nbsp;gl,
int&nbsp;lightNumber)
throws <A HREF="../../../../net/java/joglutils/lighting/LightingException.html" title="class in net.java.joglutils.lighting">LightingException</A></PRE>
<DL>
-<DD>Applies the settings on this Light to the specified OpenGL context,
- using the requested light number.
+<DD>Applies the settings on this Light to the specified OpenGL context,
+ using the requested light number. Note that this will not apply Phong Shader settings.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>gl</CODE> - the OpenGL context to use.<DD><CODE>lightNumber</CODE> - the number of the light to use (should be on [0,7]).
<DT><B>Throws:</B>
-<DD><CODE>sddm.lighting.LightingException</CODE> - if the requested light is not valid on the specified context.
-<DD><CODE><A HREF="../../../../net/java/joglutils/lighting/LightingException.html" title="class in net.java.joglutils.lighting">LightingException</A></CODE></DL>
+<DD><CODE><A HREF="../../../../net/java/joglutils/lighting/LightingException.html" title="class in net.java.joglutils.lighting">LightingException</A></CODE> - if the requested light is not valid on the specified context.</DL>
</DD>
</DL>
<HR>
@@ -921,14 +985,13 @@ public void <B>retrieve</B>(javax.media.opengl.GL&nbsp;gl,
int&nbsp;lightNumber)
throws <A HREF="../../../../net/java/joglutils/lighting/LightingException.html" title="class in net.java.joglutils.lighting">LightingException</A></PRE>
<DL>
-<DD>Reconfigures the settings on this Light from the state of the specified
- OpenGL context, using the requested light number.
+<DD>Reconfigures the settings on this Light from the state of the specified
+ OpenGL context, using the requested light number. Note that this will not retrieve Phong Shader settings.
<P>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>gl</CODE> - the OpenGL context to use.<DD><CODE>lightNumber</CODE> - the number of the light to use (should be on [0,7]).
<DT><B>Throws:</B>
-<DD><CODE>sddm.lighting.LightingException</CODE> - if the requested light is not valid on the specified context.
-<DD><CODE><A HREF="../../../../net/java/joglutils/lighting/LightingException.html" title="class in net.java.joglutils.lighting">LightingException</A></CODE></DL>
+<DD><CODE><A HREF="../../../../net/java/joglutils/lighting/LightingException.html" title="class in net.java.joglutils.lighting">LightingException</A></CODE> - if the requested light is not valid on the specified context.</DL>
</DD>
</DL>
<HR>
@@ -945,8 +1008,7 @@ public void <B>enable</B>(javax.media.opengl.GL&nbsp;gl,
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>gl</CODE> - the OpenGL context to use.<DD><CODE>lightNumber</CODE> - the number of the light to use (should be on [0,7]).
<DT><B>Throws:</B>
-<DD><CODE>sddm.lighting.LightingException</CODE> - if the requested light is not valid on the specified context.
-<DD><CODE><A HREF="../../../../net/java/joglutils/lighting/LightingException.html" title="class in net.java.joglutils.lighting">LightingException</A></CODE></DL>
+<DD><CODE><A HREF="../../../../net/java/joglutils/lighting/LightingException.html" title="class in net.java.joglutils.lighting">LightingException</A></CODE> - if the requested light is not valid on the specified context.</DL>
</DD>
</DL>
<HR>
@@ -963,8 +1025,7 @@ public void <B>disable</B>(javax.media.opengl.GL&nbsp;gl,
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>gl</CODE> - the OpenGL context to use.<DD><CODE>lightNumber</CODE> - the number of the light to use (should be on [0,7]).
<DT><B>Throws:</B>
-<DD><CODE>sddm.lighting.LightingException</CODE> - if the requested light is not valid on the specified context.
-<DD><CODE><A HREF="../../../../net/java/joglutils/lighting/LightingException.html" title="class in net.java.joglutils.lighting">LightingException</A></CODE></DL>
+<DD><CODE><A HREF="../../../../net/java/joglutils/lighting/LightingException.html" title="class in net.java.joglutils.lighting">LightingException</A></CODE> - if the requested light is not valid on the specified context.</DL>
</DD>
</DL>
<HR>
@@ -1055,7 +1116,7 @@ setLightPosition</H3>
<PRE>
public void <B>setLightPosition</B>(float[]&nbsp;lightPosition)</PRE>
<DL>
-<DD>Specifies the direction vector for this Light.
+<DD>Specifies the direction vector for this Light.
(i.e. this the first 3 components specified when setting GL_POSITION with glLight)
Default is {0,0,1}.
<P>
@@ -1072,7 +1133,7 @@ public void <B>setLightPosition</B>(float&nbsp;lightx,
float&nbsp;lighty,
float&nbsp;lightz)</PRE>
<DL>
-<DD>Specifies the direction vector for this Light.
+<DD>Specifies the direction vector for this Light.
(i.e. this the first 3 components specified when setting GL_POSITION with glLight)
Default is {0,0,1}.
<P>
@@ -1344,8 +1405,7 @@ public static int <B>idToNum</B>(int&nbsp;lightID)
<DT><B>Parameters:</B><DD><CODE>lightID</CODE> - the OpenGL ID (should be one of GL_LIGHTn where n is on [0,7])
<DT><B>Returns:</B><DD>the appropriate light number (on [0,7])
<DT><B>Throws:</B>
-<DD><CODE>sddm.lighting.LightingException</CODE> - if the supplied lightID is not an OpenGL light ID
-<DD><CODE><A HREF="../../../../net/java/joglutils/lighting/LightingException.html" title="class in net.java.joglutils.lighting">LightingException</A></CODE></DL>
+<DD><CODE><A HREF="../../../../net/java/joglutils/lighting/LightingException.html" title="class in net.java.joglutils.lighting">LightingException</A></CODE> - if the supplied lightID is not an OpenGL light ID</DL>
</DD>
</DL>
<HR>
@@ -1362,8 +1422,7 @@ public static int <B>numToID</B>(int&nbsp;lightNum)
<DT><B>Parameters:</B><DD><CODE>lightNum</CODE> - a number on [0,7] specifying the a light
<DT><B>Returns:</B><DD>the OpenGL ID for that light number (from the GL_LIGHTn family)
<DT><B>Throws:</B>
-<DD><CODE>sddm.lighting.LightingException</CODE> - if the input is invalid
-<DD><CODE><A HREF="../../../../net/java/joglutils/lighting/LightingException.html" title="class in net.java.joglutils.lighting">LightingException</A></CODE></DL>
+<DD><CODE><A HREF="../../../../net/java/joglutils/lighting/LightingException.html" title="class in net.java.joglutils.lighting">LightingException</A></CODE> - if the supplied lightID is not an OpenGL light ID</DL>
</DD>
</DL>
<HR>
@@ -1380,6 +1439,143 @@ public static boolean <B>hasFreeLights</B>(javax.media.opengl.GL&nbsp;gl)</PRE>
<DT><B>Returns:</B><DD>true if another Light object can be attached to this GL context</DL>
</DD>
</DL>
+<HR>
+
+<A NAME="setPhongShaded(boolean)"><!-- --></A><H3>
+setPhongShaded</H3>
+<PRE>
+public void <B>setPhongShaded</B>(boolean&nbsp;usePhongShading)
+ throws <A HREF="../../../../net/java/joglutils/lighting/LightingException.html" title="class in net.java.joglutils.lighting">LightingException</A></PRE>
+<DL>
+<DD>Sets if phong per-fragment shading (as opposed to fixed-functionality per-vertex shading) is to be used with this Light. Must come before the light is enabled.
+ This uses a vertex and fragment shader, so the fixed-functionality pipeline will not function normally.
+<P>
+<DD><DL>
+<DT><B>Parameters:</B><DD><CODE>usePhongShading</CODE> - if Phong should be used. If true and this Light is attached to a GL Context, initializes on this Light's context
+<DT><B>Throws:</B>
+<DD><CODE><A HREF="../../../../net/java/joglutils/lighting/LightingException.html" title="class in net.java.joglutils.lighting">LightingException</A></CODE> - if the current OpenGL context does not support GLSL shaders or the shader did not sucessfully compile and link</DL>
+</DD>
+</DL>
+<HR>
+
+<A NAME="isPhongShaded()"><!-- --></A><H3>
+isPhongShaded</H3>
+<PRE>
+public boolean <B>isPhongShaded</B>()</PRE>
+<DL>
+<DD>Tells if this Light is using Phong shading
+<P>
+<DD><DL>
+
+<DT><B>Returns:</B><DD>true if this Light is in Phong shading mode</DL>
+</DD>
+</DL>
+<HR>
+
+<A NAME="setPhongColorMaterial(boolean, boolean)"><!-- --></A><H3>
+setPhongColorMaterial</H3>
+<PRE>
+public void <B>setPhongColorMaterial</B>(boolean&nbsp;ambient,
+ boolean&nbsp;diffuse)</PRE>
+<DL>
+<DD>Sets whether or not the opengl color should be used for the phong color shader
+<P>
+<DD><DL>
+<DT><B>Parameters:</B><DD><CODE>ambient</CODE> - the ambient color material mode<DD><CODE>diffuse</CODE> - the diffuse color material mode</DL>
+</DD>
+</DL>
+<HR>
+
+<A NAME="isAmbientPhongColorMaterial()"><!-- --></A><H3>
+isAmbientPhongColorMaterial</H3>
+<PRE>
+public boolean <B>isAmbientPhongColorMaterial</B>()</PRE>
+<DL>
+<DD>Determines if color material is used for ambient in the Phong shader
+<P>
+<DD><DL>
+
+<DT><B>Returns:</B><DD>true if color material is used for the phong ambient shader</DL>
+</DD>
+</DL>
+<HR>
+
+<A NAME="isDiffusePhongColorMaterial()"><!-- --></A><H3>
+isDiffusePhongColorMaterial</H3>
+<PRE>
+public boolean <B>isDiffusePhongColorMaterial</B>()</PRE>
+<DL>
+<DD>Determines if color material is used for diffuse in the Phong shader
+<P>
+<DD><DL>
+
+<DT><B>Returns:</B><DD>true if color material is used for the phong diffuse shader</DL>
+</DD>
+</DL>
+<HR>
+
+<A NAME="initializePhongShader()"><!-- --></A><H3>
+initializePhongShader</H3>
+<PRE>
+public static void <B>initializePhongShader</B>()
+ throws <A HREF="../../../../net/java/joglutils/lighting/LightingException.html" title="class in net.java.joglutils.lighting">LightingException</A></PRE>
+<DL>
+<DD>Initializes Phong shading mode for this Light (instead of the fixed functionality Gouraud shading) on the current OpenGL context. Must be called before Phong shading can be activated.
+<P>
+<DD><DL>
+
+<DT><B>Throws:</B>
+<DD><CODE><A HREF="../../../../net/java/joglutils/lighting/LightingException.html" title="class in net.java.joglutils.lighting">LightingException</A></CODE> - if the OpenGL context does not support GLSL shaders or the shader did not sucessfully compile and link</DL>
+</DD>
+</DL>
+<HR>
+
+<A NAME="initializePhongShader(javax.media.opengl.GL)"><!-- --></A><H3>
+initializePhongShader</H3>
+<PRE>
+public static void <B>initializePhongShader</B>(javax.media.opengl.GL&nbsp;gl)
+ throws <A HREF="../../../../net/java/joglutils/lighting/LightingException.html" title="class in net.java.joglutils.lighting">LightingException</A></PRE>
+<DL>
+<DD>Initializes Phong shading mode for this Light (instead of the fixed functionality Gouraud shading). Must be called on the context before Phong shading can be activated.
+<P>
+<DD><DL>
+<DT><B>Parameters:</B><DD><CODE>gl</CODE> - the openGL context on which to initialize the shader
+<DT><B>Throws:</B>
+<DD><CODE><A HREF="../../../../net/java/joglutils/lighting/LightingException.html" title="class in net.java.joglutils.lighting">LightingException</A></CODE> - if the OpenGL context does not support GLSL shaders or the shader did not sucessfully compile and link</DL>
+</DD>
+</DL>
+<HR>
+
+<A NAME="removePhongShader()"><!-- --></A><H3>
+removePhongShader</H3>
+<PRE>
+public static void <B>removePhongShader</B>()
+ throws <A HREF="../../../../net/java/joglutils/lighting/LightingException.html" title="class in net.java.joglutils.lighting">LightingException</A></PRE>
+<DL>
+<DD>Removes the Phong Shader program from the current GL Context
+<P>
+<DD><DL>
+
+<DT><B>Throws:</B>
+<DD><CODE><A HREF="../../../../net/java/joglutils/lighting/LightingException.html" title="class in net.java.joglutils.lighting">LightingException</A></CODE> - if there is no Phong Shader</DL>
+</DD>
+</DL>
+<HR>
+
+<A NAME="removePhongShader(javax.media.opengl.GL)"><!-- --></A><H3>
+removePhongShader</H3>
+<PRE>
+public static void <B>removePhongShader</B>(javax.media.opengl.GL&nbsp;gl)
+ throws <A HREF="../../../../net/java/joglutils/lighting/LightingException.html" title="class in net.java.joglutils.lighting">LightingException</A></PRE>
+<DL>
+<DD>Removes the Phong Shader program from the specified GL Context
+<P>
+<DD><DL>
+<DT><B>Parameters:</B><DD><CODE>gl</CODE> - the OpenGL context to remove the Phong shader program from
+<DT><B>Throws:</B>
+<DD><CODE><A HREF="../../../../net/java/joglutils/lighting/LightingException.html" title="class in net.java.joglutils.lighting">LightingException</A></CODE> - if there is no Phong Shader initialized on this context</DL>
+</DD>
+</DL>
<!-- ========= END OF CLASS DATA ========= -->
<HR>