OpenGL implementation for JavaFX, based on JOGL
- HiDPI support
- One-line Node creation
- Smooth resizing without slowing down the program
- Just a simple Pane node
-
Add dependency
repositories { // ... maven { url 'https://jitpack.io' } } dependencies { implementation 'com.github.husker-dev:openglfx:1.1' }
-
Create node
Node glNode = OpenGLCanvas.create();
Node glNode = OpenGLCanvas.create(/* GLCapabilities */, /* FPS */);
Node glNode = OpenGLCanvas.create(/* GLCapabilities */, /* FPS */, /* requireDirectDraw */);
Universal | Direct GL | |
---|---|---|
Performance | ❌ | ✔️ |
Smooth resizing | ❌ | ✔️ |
Separate GL context | ✔️ | ❌ |
OpenGL pipeline | ✔️ | ✔️ |
DirectX pipeline | ✔️ | ❌ |
Software pipeline | ✔️ | ❌ |
Calls init once |
✔️ | ❌ |
To disable Direct GL
mode, set requireDirectDraw
variable to false when creating the node.
Read wiki articles for more information