Main sketch uses P3D.
Second sketch uses default renderer.
App freezes if using runSketch to spawn the second sketch, no console output.
This happens in Processing 3.4 and OSX Mojave (10.14.6)
All other combinations (Default->P3D, Default->Default, P3D->P3D) work perfectly.
Minimal (non)working example follows.
void settings()
{
size(400, 300, P3D);
}
void setup()
{
String[] args = {TestApplet.class.getName()};
PApplet.runSketch(args, new TestApplet());
}
class TestApplet extends PApplet
{
void settings()
{
size(300, 200); // Works if P2D or P3D
}
};
there is a thing about processing (JAVA)
that when you run 2 different sketches you can not control in what console the print("");
will show up.
so check in both please, possibly add print("program 1: var x"+x);
Hey kll, thanks for the reply.
When using runSketch, the new applet’s out and err are redirected to the same console as the main applet.
I just tested this to be extra sure btw.
Right now, I need this working because I’ve been working for two years now on a 3D modelling soft (www.voxedit.io) and it has dettachable UI panels to take advantage of multiple monitors.
Having more than one P3D sketch is troublesome and performance heavy, so the panels use the default renderer while dettached.
This means a P3D sketch doing runSketch on default renderer sketches, which triggers the issue I discussed above (only in OSX Mojave!)
Right now I’m working on my seventh workaround today: having a hidden P3D sketch to manage all 3D rendering in an offscreen way, thus letting all visible sketches use the default renderer.