Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Is it possible to enable hardware acceleration with Java FX on Windows 2008 server?

As discussed in this question, it's possible to detect whether Java FX is using hardware acceleration by passing -Dprism.verbose=true as a system property. When I do this on my Java FX app on Windows 2008 Server R2, it is apparently falling back to the software rendering:

Prism pipeline init order: d3d j2d
Using t2k for text rasterization
Using dirty region optimizations
Prism pipeline name = com.sun.prism.d3d.D3DPipeline
Loading D3D native library ...
        succeeded.
Direct3D initialization failed
Wrong operating system version
(X) Got class = class com.sun.prism.d3d.D3DPipeline
GraphicsPipeline.createPipeline: error initializing pipeline com.sun.prism.d3d.D3DPipeline
*** Fallback to Prism SW pipeline
Prism pipeline name = com.sun.prism.j2d.J2DPipeline
(X) Got class = class com.sun.prism.j2d.J2DPipeline
Initialized prism pipeline: com.sun.prism.j2d.J2DPipeline

My question is, is it possible to force hardware acceleration, say by fooling JFX into thinking I have a different operating system? I'm hoping it might Just Work if I could bypass the OS check somehow.

like image 855
pchiusano Avatar asked Feb 19 '13 20:02

pchiusano


People also ask

Does JavaFX use hardware acceleration?

Graphics SupportIf your system does not support hardware acceleration, then JavaFX uses the Java2D software pipeline. To avoid rendering issues on Windows platforms, upgrade the ATI driver to Catalyst 11.09 or later.

Can you turn on hardware acceleration?

If you're looking to enable—or re-enable—hardware acceleration, head back to chrome://settings/system and toggle “Use hardware acceleration when available” setting to the “On” position. Then, click “Relaunch” to apply the change.

Why can't ti enable hardware acceleration?

Try to right-click on your desktop and select Personalize > Display > Change display settings > Advanced settings > Troubleshoot tab > Change settings > Adjust the hardware acceleration.


2 Answers

It is fairly easy : -Dprism.forceGPU=true

like image 184
Alexander Kirov Avatar answered Nov 14 '22 21:11

Alexander Kirov


you can also define the order that javaFx tries to use like: -Dprism.order=es2,j2d. You need it if you want OpenGl rendering on Windows

like image 29
Arne Avatar answered Nov 14 '22 22:11

Arne