diff --git a/core/src/processing/core/PGraphics.java b/core/src/processing/core/PGraphics.java index aa31c9895..ffed694d5 100644 --- a/core/src/processing/core/PGraphics.java +++ b/core/src/processing/core/PGraphics.java @@ -3784,6 +3784,10 @@ public abstract class PGraphics extends PImage implements PConstants { public void lights() { depthError("lights"); } + + public void noLights() { + depthError("noLights"); + } public void ambientLight(float red, float green, float blue) { depthError("ambientLight"); diff --git a/core/src/processing/core/PGraphics3D.java b/core/src/processing/core/PGraphics3D.java index 834abef8e..b62d14095 100644 --- a/core/src/processing/core/PGraphics3D.java +++ b/core/src/processing/core/PGraphics3D.java @@ -3657,6 +3657,17 @@ public class PGraphics3D extends PGraphics { lightingDependsOnVertexPosition = false; } + + + /** + * Turn off all lights. + */ + public void noLights() { + // write any queued geometry, because lighting will be goofed after + flush(); + // set the light count back to zero + lightCount = 0; + } /** diff --git a/core/todo.txt b/core/todo.txt index bc879896e..2be121b32 100644 --- a/core/todo.txt +++ b/core/todo.txt @@ -1,4 +1,6 @@ 0134 core +X add noLights() method +X http://dev.processing.org/bugs/show_bug.cgi?id=666 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .