Skip to content

How to enable OpenGL pipeline on Windows

Nikita Shtengauer edited this page May 23, 2022 · 2 revisions

JavaFX does not have the OpenGL pipeline for Windows enabled by default due to incompatibility with some graphics cards and drivers.

But you can force them to be included in the library.


To use OpenGL rendering pipeline on Windows, you can use two ways:

  1. Use precompiled library

    Compiled on JavaFX 16, may not work in future releases

    • Download OpenGL extension for Windows [Download]
    • Add file to the project as a default .jar library
  2. Compile OpenJFX sources by yourself

    • Build sources using official instruction

    • Change line in build.gradle

      From this:

      defineProperty("INCLUDE_ES2", IS_WINDOWS ? "false" : "true")

      To this

      defineProperty("INCLUDE_ES2", "true")
    • Compile project using gradle task

    • Add prism_es2.dll and javafx.graphics.jar to your project

Clone this wiki locally