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

别说谁变了你拦得住时间么 提交于 2020-01-02 04:39:05

问题


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.


回答1:


It is fairly easy : -Dprism.forceGPU=true




回答2:


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




回答3:


looks like you have not installed DirectX.

Direct3D initialization failed..



来源:https://stackoverflow.com/questions/14966427/is-it-possible-to-enable-hardware-acceleration-with-java-fx-on-windows-2008-serv

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!