Search code examples
direct3djavafx-3d

JavaFX dependency on video card


Is there any video card related dependency in JavaFX? The main issue is that I am getting an error on my application whenever I am trying to process a large images. We turned verbose logging on for Prism, and discovered that the reason for this discrepancy is that Prism fails to load Direct3D when run inside a Windows service, and is forced to fall back on its software rendering pipeline instead of using hardware acceleration.

Here's the relevant part of the log:

Direct3D initialization failed
Adapter validation failed for all adapters
(X) Got class = class com.sun.prism.d3d.D3DPipeline
GraphicsPipeline.createPipeline: error initializing pipeline com.sun.prism.d3d.D3DPipeline *** Fallback to Prism SW pipeline


Solution

  • Hardware based acceleration requires supported hardware for it to work. If supported hardware is not available, the system will fall back to software rendering (which is exactly what the log you showed says). Either way JavaFX will work.

    Without hardware acceleration some features may be disabled (see ConditionalFeature).

    Unless you are attempting to use features which are not enabled on your system (you can check it code using Platform.isSupported) or you are relying on the increased processing speed provided by hardware acceleration, then your application is unlikely to be impacted by running on a software rendering pipeline rather than a hardware rendering pipeline.