summaryrefslogtreecommitdiffstats
path: root/src/net/java/joglutils/lighting/Light.java
diff options
context:
space:
mode:
authoreteq <[email protected]>2006-08-17 06:01:06 +0000
committereteq <[email protected]>2006-08-17 06:01:06 +0000
commite78a70eba667f9fffb0624a7b7a76739728d3b2a (patch)
tree8d0691c5da09f6d117e5f232fd2a65db3625e0ef /src/net/java/joglutils/lighting/Light.java
parent84f386bc10ea1023ec267b12d994f9ad77520741 (diff)
small updates to the last set of changes adding phong functionality
git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/svn-server-sync/joglutils/trunk@12 83d24430-9974-4f80-8418-2cc3294053b9
Diffstat (limited to 'src/net/java/joglutils/lighting/Light.java')
-rw-r--r--src/net/java/joglutils/lighting/Light.java8
1 files changed, 3 insertions, 5 deletions
diff --git a/src/net/java/joglutils/lighting/Light.java b/src/net/java/joglutils/lighting/Light.java
index a12371e..d233838 100644
--- a/src/net/java/joglutils/lighting/Light.java
+++ b/src/net/java/joglutils/lighting/Light.java
@@ -410,9 +410,7 @@ public class Light {
gl.glUniform1i(diffMatCol,phongDiffColorMat ? 1 : 0);
gl.glUniform1i(ambMatCol,phongAmbColorMat ? 1 : 0);
-
- gl.glUseProgram(progID);
-
+
gl.glUseProgram(progID+lightNumber);
/*for light one program
int progID = shaderProgNums.get(gl);
@@ -428,8 +426,8 @@ public class Light {
int diffMatCol = gl.glGetUniformLocationARB(progID,"diffMatCol");
int ambMatCol = gl.glGetUniformLocationARB(progID,"ambMatCol");
- gl.glUniform1iARB(diffMatCol,phongDiffColorMat ? GL.GL_TRUE : GL.GL_FALSE);
- gl.glUniform1iARB(ambMatCol,phongAmbColorMat ? GL.GL_TRUE : GL.GL_FALSE);
+ gl.glUniform1iARB(diffMatCol,phongDiffColorMat ? 1 : 0);
+ gl.glUniform1iARB(ambMatCol,phongAmbColorMat ? 1 : 0);
gl.glUseProgramObjectARB(progID+lightNumber);
/*for light one program