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 only have one code review remark, I still have to do my testing for this 
change.

modules/javafx.graphics/src/main/native-prism-es2/x11/X11GLFactory.c line 237:

> 235: 
> 236:     if (visualInfo == NULL) {
> 237:         fbConfig = fbConfigList[0];

If I understand this correctly, we're just fetching the first available option 
from the list which might not always have windows transparency. If that's the 
case - would it make sense to print some sort of warning on the terminal that 
window transparency might not work correctly? I think it could be a valuable 
information to the user, or at least when debugging in the future.

@kevinrushforth it's also a question to you, cause I'm not 100% sure what the 
JFX strategy would be in this case - if we would want this to be printed always 
as a warning, or only when we ex. activate `-Dprism.verbose=true`

-------------

PR Review: https://git.openjdk.org/jfx/pull/1929#pullrequestreview-3427243988
PR Review Comment: https://git.openjdk.org/jfx/pull/1929#discussion_r2498274259

Reply via email to