On Sat, 4 Oct 2025 15:19:32 GMT, Thiago Milczarek Sayao <[email protected]> wrote:
>> As Michael Zucchi pointed out on the mailing list, the high framerate occurs >> because `glXSwapBuffers() `operates asynchronously. To ensure proper >> synchronization, you can call `glFinish() `afterward, which blocks until the >> buffer swap is fully completed. However, when using `glXSwapIntervalSGI`, >> the swap interval setting applies globally rather than per drawable. In >> contrast, `glXSwapIntervalEXT` provides per-drawable control, allowing >> finer-grained vsync behavior. >> >> I don't know if there are scenarios when the unlimited frame rate is needed >> - if so we should provide a option. >> >> See >> [https://wikis.khronos.org/opengl/Swap_Interval](https://wikis.khronos.org/opengl/Swap_Interval) >> >> It also selects the correct visual for transparency which needs to be depth >> = 32 for X11. > > Thiago Milczarek Sayao has updated the pull request incrementally with one > additional commit since the last revision: > > Call glXSwapIntervalEXT or glXSwapIntervalSGI if not null I had problems verifying this on my Ubuntu VM - the framerate did go a bit lower, but it also did not properly cap after this change (FPS was fluctuating between 40 and 100 with 60Hz refresh rate). However, I think this must be a problem related specifically to the VM GPU driver. I dug out an old laptop with Intel UHD Graphics card that runs Fedora natively and (after hours of installing updates) can confirm both the issue reproduces on latest JFX version and that this change does fix the issue. I also noted that there is a third swap control extension, `MESA_swap_control`. I tried it hoping it would help on the Ubuntu VM but with the same result as the above. I think there's no reason to pursue the solution to this any further for the VM, it works on native systems properly and that matters the most. I'll be happy to approve this once we address the comment I left. ------------- PR Comment: https://git.openjdk.org/jfx/pull/1929#issuecomment-3528457410
