<AWT Dev> Translucency support in Swing with OpenGL

Christophe LAFOLET christophe.lafolet at laposte.net
Thu Feb 6 10:08:29 UTC 2020


Hello, 

we have detected the problem using the demo program from Oracle and
-Dsun.java2d.opengl=true
https://docs.oracle.com/javase/tutorial/displayCode.html?code=https://docs.oracle.com/javase/tutorial/uiswing/examples/misc/GradientTranslucentWindowDemoProject/src/misc/GradientTranslucentWindowDemo.java

The problem is in file sun/java2d/opengl/GLXGraphicsConfig.c
In the method GLXGC_InitFBConfig(), a score is computed to select a visual
with the minimal Vram usage but it do not take into account the alpha. 
According to the list of visuals, if the visuals with alpha are at the
beginning of the list, they can be selected, if they are at the end of the
list (our case), they are never selected.

Christophe





--
Sent from: http://openjdk.5641.n7.nabble.com/OpenJDK-AWT-Development-f82211.html


More information about the awt-dev mailing list