-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Closed
Labels
Description
Original author: [email protected] (November 09, 2012 01:44:02)
If I draw a pgraphics object with image(pg,x,y,w,h) to a smaller area on the screen it will only draw once.
If I don't use w and h in my image call it works fine
PGraphics pg;
void setup() {
size(200, 200,OPENGL);
//pg = createGraphics(20, 20,OPENGL); // works fine
pg = createGraphics(500, 500,OPENGL);
}
void draw() {
pg.beginDraw();
pg.background(102);
pg.stroke(255);
pg.strokeWeight(20);
pg.line(pg.width_0.5, pg.height_0.5, mouseX_10, 10_mouseY);
pg.endDraw();
image(pg, 50, 50, 100, 100); // only renders once
// image(pg,50,50); // works fine
}