[SOLVED] I get a NullPointerException when switching from the default rendering technique to JavaFX 2D

[SOLUTION]

I found a solution for this problem on github:

In the case of using the FX2D renderer, controlP5’s BitFont can’t be rendered and by attempting to do so the above error message is caused. To work around this, set the font to a non-BitFont by calling cp5.setFont(createFont("Arial",10)); right after creating an instance of cp5.

1 Like