fill() also sets the ambient color (as the old P3D used to do)

This commit is contained in:
codeanticode
2012-04-09 19:55:01 +00:00
parent c3b69b3294
commit c5838c950f
2 changed files with 32 additions and 0 deletions

View File

@@ -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();
}
//////////////////////////////////////////////////////////////