Response title
This is preview!




Click on Join Now to Sign Up
// 2-screen display based on code found at
// http://forum.processing.org/topic/second-monitor-window-and-optimizing-performance
import processing.opengl.*;
import codeanticode.glgraphics.*;
GLGraphicsOffScreen winGraphics; // the graphics object for the second window...
GLTextureWindow win;
void setup() {
size( 200, 200, GLConstants.GLGRAPHICS );
win = new GLTextureWindow( this, 100, 100, 400, 400 ); // 400x400 big at location 100,100
winGraphics = new GLGraphicsOffScreen( this, 400, 400 );
win.setTexture( winGraphics.getTexture() );
}
void draw() {
// do rendering of first screen just like you would normally
background(0);
fill(64);
ellipse(width/2, height/2, 50, 50);
winGraphics.beginDraw();
// do all your drawing for the second window here
winGraphics.background ( 0 );
winGraphics.stroke( 255 );
winGraphics.line( 0, 0, 400, 400 );
winGraphics.endDraw();
}