Skip to content

Instantly share code, notes, and snippets.

@schwittlick
Forked from codeanticode/multi_surface.pde
Created November 20, 2015 16:17
Show Gist options
  • Save schwittlick/5dd3a12b51eb0977b7a9 to your computer and use it in GitHub Desktop.
Save schwittlick/5dd3a12b51eb0977b7a9 to your computer and use it in GitHub Desktop.
PGraphics pg;
PSurface surf;
void settings() {
size(320, 240);
}
void setup() {
pg = createGraphics(500, 200);
surf = pg.createSurface();
surf.initFrame(this);
surf.placeWindow(new int[] {100, 100}, null);
surf.setVisible(true);
surf.startThread();
}
void draw() {
background(255, 0, 0);
fill(255);
rect(10, 10, frameCount, 10);
}
void mousePressed(){
println("mousePressed");
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment