Skip to content

Instantly share code, notes, and snippets.

@atduskgreg
Created November 20, 2015 21:34
Show Gist options
  • Star 2 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save atduskgreg/c6c1eff8aaf99e30dac0 to your computer and use it in GitHub Desktop.
Save atduskgreg/c6c1eff8aaf99e30dac0 to your computer and use it in GitHub Desktop.
PGraphics pg;
PSurface surf;
MyWindow win;
void settings() {
size(320, 240);
}
void setup() {
pg = createGraphics(500, 200);
surf = pg.createSurface();
win = new MyWindow();
surf.initFrame(win);
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");
}
class MyWindow extends PApplet{
void setup(){
background(0);
}
void draw(){
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment