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 & HelpSyntax Questions › Multiple frames in P2D mode
Page Index Toggle Pages: 1
Multiple frames in P2D mode (Read 289 times)
Multiple frames in P2D mode
Jan 12th, 2009, 3:22pm
 
Ok, not sure if the title describes this in the most perfect way, which is maybe
why i've been having trouble googling and browsing the forums for something
similar.

Short history:
I am in the process of creating a VJ tool for live performances. For this I need
a bunch of on-screen controls that I want in a separate frame. So far I have
been able to use the main frame for the controls and create a second frame
that I am using as main output that will be projected.

My Problem:
The second frame holds a GLCanvas instance that i draw to for opengl magic.
However, since I am writing this framework I would like to support the other
renderers of Processing aswell (mainly P2D).

Question:
Is it possible to use the processing commands outside of the main window?
And if so, is there something like a P2DCanvas class, or would it even be
possible for me to write one?

This might be some extremly silly thing that I have overlooked, so please
forgive me in advance if so. I have tried searching but have come up short.

Thank you.
Re: Multiple frames in P2D mode
Reply #1 - Jan 13th, 2009, 9:44pm
 
Hi, Take a look at createGraphics() on the reference page, to quote: "Creates and returns a new PGraphics object of the types P2D, P3D, and JAVA2D. Use this class if you need to draw into an off-screen graphics buffer."

Hope this helps.
--
Tom
Page Index Toggle Pages: 1