fixes bug #958, darker drawing with opengl

This commit is contained in:
benfry
2009-02-20 00:28:28 +00:00
parent 8cfa5e127d
commit b4c3fa7239

View File

@@ -1976,6 +1976,7 @@ public class PGraphicsOpenGL extends PGraphics3D {
protected void ambientFromCalc() {
super.ambientFromCalc();
calcColorBuffer();
gl.glMaterialfv(GL.GL_FRONT_AND_BACK, GL.GL_AMBIENT, colorBuffer, 0);
}
@@ -2003,6 +2004,7 @@ public class PGraphicsOpenGL extends PGraphics3D {
protected void specularFromCalc() {
super.specularFromCalc();
calcColorBuffer();
gl.glMaterialfv(GL.GL_FRONT_AND_BACK, GL.GL_SPECULAR, colorBuffer, 0);
}
@@ -2036,6 +2038,7 @@ public class PGraphicsOpenGL extends PGraphics3D {
protected void emissiveFromCalc() {
super.emissiveFromCalc();
calcColorBuffer();
gl.glMaterialfv(GL.GL_FRONT_AND_BACK, GL.GL_EMISSION, colorBuffer, 0);
}