As discussed in this question , you can determine whether Java FX uses hardware acceleration by passing -Dprism.verbose=trueas a system property. When I do this in my Java FX application on Windows 2008 Server R2, it obviously returns to 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 tricking JFX into thinking that I have a different operating system? I hope this can just work if I can somehow get around the OS check.
source
share