Switching the rendering engine to FX2D has introduced a lot of absurdities that I’ve never had to deal with before, including this issue right here:
Which was an easy, yet unexpected, fix.
However, another issue has come up. It seems as though setting the render engine to FX2D makes the window resizable by default. In my sketch, I would like the window to not be resizable. So I add this bit of code to setup():
Now, after adding that and running it, the sketch immediately closes with the most ambiguous error message that I have ever seen:
handleDraw() called before finishing Could not run the sketch (Target VM failed to initialize). For more information, read revisions.txt and Help ? Troubleshooting.
Now, if I keep all my code as it is, but change the rendering engine back to the default, this problem does not occur. I did some minimal research before posting this, but I couldn’t find this same issue in anyone else’s post. So please send help
Where in the code should I put this? Should I put it before or after setup()? Because I tried to put it before setup and I got errors for the variables canvas, scene, and stage saying that those variables do not exist.
Pardon me if I’m mistaken, but it seems as though there should be another library to import because I’m still getting the message “The class PSurfaceFX does not exist”
Alright that worked, but now I get a null pointer exception on stage.setResizable(false); because the stage has not been initialized yet. I’ve been putting this code right above setup().
Omg it worked! Wow that was a real journey we went on for such a tiny thing XD! Thank you so much for your help.
Now, I have no idea which one of your messages I should mark as the solution because the solution is spread out over all of your messages xP