diff --git a/android/core/src/processing/opengl/PGraphicsOpenGL.java b/android/core/src/processing/opengl/PGraphicsOpenGL.java index de516913e..bdd3be716 100644 --- a/android/core/src/processing/opengl/PGraphicsOpenGL.java +++ b/android/core/src/processing/opengl/PGraphicsOpenGL.java @@ -4071,6 +4071,22 @@ public class PGraphicsOpenGL extends PGraphics { } + ////////////////////////////////////////////////////////////// + + // FILL COLOR + + + protected void fillFromCalc() { + super.fillFromCalc(); + + // Setting the ambient color from the current fill + // is what the old P3D did and allows to have an + // default ambient color when the user doesn't specify + // it explicitly. + ambientFromCalc(); + } + + ////////////////////////////////////////////////////////////// // LIGHTING diff --git a/java/libraries/opengl/src/processing/opengl/PGraphicsOpenGL.java b/java/libraries/opengl/src/processing/opengl/PGraphicsOpenGL.java index c71a8174a..2847329aa 100644 --- a/java/libraries/opengl/src/processing/opengl/PGraphicsOpenGL.java +++ b/java/libraries/opengl/src/processing/opengl/PGraphicsOpenGL.java @@ -4079,6 +4079,22 @@ public class PGraphicsOpenGL extends PGraphics { this.strokeCap = cap; } + + ////////////////////////////////////////////////////////////// + + // FILL COLOR + + + protected void fillFromCalc() { + super.fillFromCalc(); + + // Setting the ambient color from the current fill + // is what the old P3D did and allows to have an + // default ambient color when the user doesn't specify + // it explicitly. + ambientFromCalc(); + } + //////////////////////////////////////////////////////////////