正如在这个问题中所讨论的,可以通过-Dprism.verbose=true
作为系统属性传递来检测 Java FX 是否正在使用硬件加速。当我在 Windows 2008 Server R2 上的 Java FX 应用程序上执行此操作时,它显然会退回到软件渲染:
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
我的问题是,是否可以强制硬件加速,比如让 JFX 认为我有不同的操作系统?如果我能以某种方式绕过操作系统检查,我希望它可以正常工作。