Discussion:
XLIB_SKIP_ARGB_VISUALS and Qt OpenGL application with mesa
Mathieu Westphal
2018-09-21 13:14:39 UTC
Permalink
Hello Xorg list,

When using mesa, my Qt OpenGL based application has some transparency issue.
The OpenGL rendering zone is transparent but it should not be.

XLIB_SKIP_ARGB_VISUALS seems to fix the issue but I wonder how I could
specify this in the c++ code instead as in the environnement.

Regarding the Xorg documentation :
5.3. Composite exposes extra visuals

When the Composite extension is enabled via xorg.conf or the command line,
a new visual is created. This visual is different from the other visuals
used by X applications in that it includes an alpha component. It is used
by the compositing manager and other Composite aware applications.

Most X applications ignore this visual since it is not useful to them;
however some applications mistakenly try to use it, which will cause them
to fail. An environment variable, XLIB_SKIP_ARGB_VISUALS, was added to the
X11 library to hide this visual from applications that mistakenly try to
use it. If an application fails only when the Composite is enabled, try
setting this environment variable before starting the application.

Since Composite is not enabled by default, it is not expected that this
issue will be visible to most users.

My question would be : How to programmatic ally ensure that my Qt
application does not mistakenly try to use the extra composite visual.

Thanks,

Mathieu Westphal
Adam Jackson
2018-09-21 17:54:59 UTC
Permalink
Post by Mathieu Westphal
Hello Xorg list,
When using mesa, my Qt OpenGL based application has some transparency issue.
The OpenGL rendering zone is transparent but it should not be.
You've picked the ARGB visual. Don't. Set GLX_ALPHA_SIZE to 0 in
glXChooseFBConfig.
Post by Mathieu Westphal
Since Composite is not enabled by default, it is not expected that
this issue will be visible to most users.
Whatever documentation this is, is severely out of date. Composite's
been enabled by default since xserver 1.4 in 2007 or so.

- ajax
_______________________________________________
***@lists.x.org: X.Org support
Archives: http://lists.freedesktop.org/archives/xorg
Info: https://lists.x.org/mailman/listinfo/xorg
Alan Coopersmith
2018-09-21 18:11:16 UTC
Permalink
Post by Adam Jackson
Post by Mathieu Westphal
Since Composite is not enabled by default, it is not expected that
this issue will be visible to most users.
Whatever documentation this is, is severely out of date. Composite's
been enabled by default since xserver 1.4 in 2007 or so.
That quote comes from the X11R6.8.2 release notes from 2005:
ftp://www.x.org/pub/X11R6.8.2/doc/RELNOTES5.html

It holds no relevance to anything today.
--
-Alan Coopersmith- ***@oracle.com
Oracle Solaris Engineering - https://blogs.oracle.com/alanc
_______________________________________________
***@lists.x.org: X.Org support
Archives: http://lists.freedesktop.org/archives/xorg
Info: https://lists.x.org/mailman/li
Mathieu Westphal
2018-09-24 08:36:45 UTC
Permalink
Thanks for your help, we indeed add a call to

fmt.setAlphaBufferSize(1);

Mathieu Westphal


On Fri, Sep 21, 2018 at 8:11 PM Alan Coopersmith <
Post by Alan Coopersmith
Post by Adam Jackson
Post by Mathieu Westphal
Since Composite is not enabled by default, it is not expected that
this issue will be visible to most users.
Whatever documentation this is, is severely out of date. Composite's
been enabled by default since xserver 1.4 in 2007 or so.
ftp://www.x.org/pub/X11R6.8.2/doc/RELNOTES5.html
It holds no relevance to anything today.
--
Oracle Solaris Engineering - https://blogs.oracle.com/alanc
Loading...