【问题标题】:Is it possible to enable hardware acceleration with Java FX on Windows 2008 server?是否可以在 Windows 2008 服务器上使用 Java FX 启用硬件加速?
【发布时间】:2013-02-19 20:09:11
【问题描述】:

正如in this question 所讨论的,可以通过将-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 认为我有不同的操作系统?如果我能以某种方式绕过操作系统检查,我希望它可以正常工作。

【问题讨论】:

标签: java graphics javafx-2 javafx hardware-acceleration


【解决方案1】:

这相当简单:-Dprism.forceGPU=true

【讨论】:

  • 这个标志似乎没有做任何事情。我得到完全相同的日志消息。
  • 它只是比平时更努力。如果它不能 - 麻烦是无法避免的......
【解决方案2】:

您还可以定义 javaFx 尝试使用的顺序,例如:-Dprism.order=es2,j2d。 如果你想在 Windows 上进行 OpenGl 渲染,你需要它

【讨论】:

  • WARNING: The prism-j2d pipeline should not be used as the software fallback pipeline. It is no longer tested nor intended to be used for on-screen rendering. Please use the prism-sw pipeline instead by setting the "prism.order" system property to "sw" rather than "j2d".
【解决方案3】:

看起来您还没有安装 DirectX。

Direct3D 初始化失败..

【讨论】:

    猜你喜欢
    • 2018-11-02
    • 1970-01-01
    • 1970-01-01
    • 2011-02-25
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多