We are about to switch to a new forum software. Until then we have removed the registration on this forum.
Hello,
I want to change default rendered to P3D on user request. User request can be processed after setup() was run.
That is what I tried:
If I run size() outside setup() it does not work for P3D. It works for default rendered (not specified) - but size of the sketch window is small.
I get an error if user selects 3D:
Caused by processing.core.PApplet$RendererChangeException
How to do this correctly?
Answers
AFaIK, we can't. At least not w/o some serious yet-unknown hack! :-<
As a workaround, you can instantiate an extra PApplet via runSketch().
Then setVisible() + noLoop() the main one. Go check some forum threads about it:
https://forum.Processing.org/two/discussions/tagged?Tag=papplet.runsketch()
Thank you for the prompt response and the link - looks promising - may be a solution, will try that approach.