click to place circles on the second context, should appear at mouse pointer, but do not (at least on my surface pro 4)
xxxxxxxxxx
var c2; // global second graphics context
function setup() {
createCanvas(500,500); // default graphics context
c2 = createGraphics(500,500); // second graphics context, same size
c2.background(255);
c2.ellipse(100,100,50,50); // draw an ellipse on the second screen
}
function draw() {
image(c2,0,0); // render the second screen
noFill();
rect(0,0,width-1,height-1); // put a bounding rectangle around the default screen
ellipse(100,100,50,50); // draw same ellipse on the default screen
// two ellipses should be identical, but they're not (at least on my computer
// which is a surface pro 4), the c2 context seems to be blown up somehow.
}
// click to place garish circles on second graphics context, they don't appear
// at the proper location
function mouseClicked() {
c2.stroke(color(255,0,0));
c2.fill(color(0,255,0));
c2.ellipse(mouseX,mouseY,10,10);
print(mouseX + ", " + mouseY);
}