Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Howto use Javafx without opengl?

Tags:

java

javafx

I try JavaFX tutorial with JDK8.

OpenGL is not installed on my laptop. I don't need it and I suppose I can use JavaFX without OpenGL.

Java2D when hardware acceleration is not possible

The fully hardware accelerated path is used when possible, but when it is not available, the Java2D render path is used because the Java2D render path is already distributed in all of the Java Runtime Environments (JREs). This is particularly important when handling 3-D scenes. However, performance is better when the hardware render paths are used.

I just will execute JavaFX Hello World. How ?

When I try I have this message (with -Dprism.verbose=true jvm option):

Prism pipeline init order: es2 sw
Using java-based Pisces rasterizer
Using dirty region optimizations
Not using texture mask for primitives
Not forcing power of 2 sizes for textures
Using hardware CLAMP_TO_ZERO mode
Opting in for HiDPI pixel scaling
Prism pipeline name = com.sun.prism.es2.ES2Pipeline
Loading ES2 native library ... prism_es2
succeeded.
GLFactory using com.sun.prism.es2.X11GLFactory
Unrecognized deviceID 0xa16
X Error of failed request: BadAlloc (insufficient resources for operation)
Major opcode of failed request: 156 (GLX)
Minor opcode of failed request: 24 (X_GLXCreateNewContext)
Serial number of failed request: 33
Current serial number in output stream: 34
Java Result: 1

Why Java try to use OpenGL and not Java2D.

like image 744
Pinkilla Avatar asked Mar 12 '15 08:03

Pinkilla


Video Answer


1 Answers

Add the next property:

-Dprism.order=j2d
like image 73
Paul Vargas Avatar answered Sep 21 '22 03:09

Paul Vargas