FX2D cannot be resolved to a variable.

edited November 2015 in Android Mode

The following produces the error mentioned in the title:

void settings(){
  //size(displayWidth, displayHeight, FX2D);
  fullScreen(FX2D);
  smooth();
}

I am using Processing 3.0, Android Mode.

Anybody knows why this error appears?

Tagged:

Answers

  • OK, so I found the answer:

    There are only two renderers on Android. If you specify JAVA2D (or no renderer at all), it will use the built-in Android 2D renderer. P2D, P3D and OPENGL specify graphics rendered OpenGL.

    This leads me to another question, though:

    Rendering rebuilt - OpenGL (P2D and P3D) is now stutter-free and very speedy. Some JAVA2D performance improvements as well. The new FX2D renderer offers huge speedups for 2D drawing, especially with high density “retina” displays.

    I am only switching to Processing 3 because of what is stated in the above quote. Since FX2D is not available for Android, this leads me to think that possibly "OpenGL (P2D and P3D) is now stutter-free and very speedy" only applies to desktop mode, not android.

    Is this correct? Are the speed improvements for P3D and P2D only visible for Desktop mode?

  • strange

    or retina on mac but not yet on android?

  • edited November 2015

    FX2D renderer, based on JavaFX, is a new Oracle technology for Java 8 (perhaps it works for Java 7).
    However, Android's Java, known as Dalvik, is based on Java 6. Too old for FX2D! :(

  • It's a shame. Does anyone know if performance improvements are visible for P3D and P2D for Android in Processing 3 versus Processing 2?

  • Someone must now. Please respond if you know the answer.

Sign In or Register to comment.