Login  Register

Jogl speed with libGdx when under JavaFX SwingNode

Posted by Pasi Lasse on Aug 09, 2019; 1:10pm
URL: https://forum.jogamp.org/Jogl-speed-with-libGdx-when-under-JavaFX-SwingNode-tp4039918.html

Hi!

I'm using libGdx and jogl as backend. When using JoglSwingCanvas in a Swing frame I get really good performance and everything seems to work fine.

When I create a JavaFX scene with a swing node and add JoglSwingCanvas there it still works fine but performance really drops. Seems to be related to canvas size. Is there some behind-the-scenes frame copy to CPU memory that happens? I can still see high GPU usage so it's definitely not fully drawing with CPU. I have tried both vsync disabled and enabled.

Any ideas what could cause the slowdown and how to avoid it? Thanks in advance.