P3D renders incorrect stroke color on some computers

Here is a very short program that should draw a rectangle with a green border:

size(400, 400, P3D);
stroke(0, 255, 0);
rect(0, 0, 50, 50);

On most computers, this works just fine. But on some computers (my home computer, and a computer in a lab where I teach), the rectangle ends up with a blue border. Some specifics:

  • On my home computer, it fails in Chrome, FireFox, and IE
  • It works fine in Java mode
  • It works fine if I use P2D rather than P3D, but I need to use P3D for what I want to write
  • The 2 computers where this fails are running Windows 8.1, but it works fine on most Windows 8.1 computers I've tested

I actually discovered this issue in a larger program that was supposed to produce random pastel-colored butterflies. On my home computer, all butterflies are red.

How could such a simple program produce such unexpected results?

Tagged:

Answers

  • edited April 2015

    It is a bit puzzling, but the fact it depends on the computer tend to push the blame on the graphic card. A random, but perhaps effective first move is to check if there are updates for the graphic card driver.

    Since you are on the JS mode, it might also be a problem with the WebGL renderer. Do you run the sketches on the same versions of the same browser?

Sign In or Register to comment.