We closed this forum 18 June 2010. It has served us well since 2005 as the ALPHA forum did before it from 2002 to 2005. New discussions are ongoing at the new URL http://forum.processing.org. You'll need to sign up and get a new user account. We're sorry about that inconvenience, but we think it's better in the long run. The content on this forum will remain online.
IndexProgramming Questions & HelpOpenGL and 3D Libraries › opengl and indipendent nested window
Page Index Toggle Pages: 1
opengl and indipendent nested window (Read 373 times)
opengl and indipendent nested window
Nov 21st, 2008, 10:47am
 
hi,

i have to use opengl and 3d rotation but i got a problem, to do that i must use the background function who cover everything i draw before.

I found the PGraphic constructor who should let use create a new indipendent window in your main window.

the problem with Pgrphic is that the background function still cover everything, without care about the size i've used.

Any suggestion?


ex:

PGraphics pg;

void setup() {
 size(600,600);
 pg = createGraphics(200, 200, OPENGL);
 background(255);
 pg.beginDraw();
 pg.background(000);
 pg.stroke(255, 200, 0, 100);
 pg.fill(255, 200, 0, 100);
 pg.ellipse(40,40, 50, 50);
 pg.ellipse(60,60, 50, 50);
 pg.endDraw();
 image(pg, 0, 0);    
}
Page Index Toggle Pages: 1