GLUT windows are transparent when compositor is active & xlib mesa in use

Bug #369891 reported by Venkatesh Srinivas
38
This bug affects 7 people
Affects Status Importance Assigned to Milestone
freeglut (Ubuntu)
New
Undecided
Unassigned

Bug Description

Binary package hint: freeglut3

When a compositor (Compiz is the only one I tried) is active and an Xlib version of Mesa is selected via LD_LIBRARY_PATH, GLUT windows appear transparent when they shouldn't.

Setting XLIB_SKIP_ARGB_VISUALS works around the problem when xlib/Mesa is used, but setting that and using Mesa/DRI prevents the GLUT program from working at all.

http://www.x.org/archive/X11R6.8.0/doc/RELNOTES5.html, section 5.3 claims that this problem is with the application mistakenly using a new visual, exposed by the Composite extension. The release notes also claim this won't affect most users, since Composite isn't enabled by default. This is not the case for Xorg on Ubuntu (at least).

This is on Ubuntu 8.10 and 9.04. freeglut3 version 2.4.0-6.1ubuntu1 (at least) is affected. The xlib version of Mesa was built from the January 22nd Mesa release (7.3). Mesa 7.4 / xlib, released April 29th, is also affected.

description: updated
Revision history for this message
ZelinskiyIS (ivze) wrote :

I confirm the bug. I have encountered it while playing around with OpenGL tutorials.

The simple c program is attached. It is compiled with command "gcc kaka.c -lGL -lGLU -lglut".
I am using freeglut3-dev, libgl1-mesa-* libraries. The system is Ubuntu 9.04. The hardware is Intel 945GME videochip.

When the program is started with "Additional visual effects enabled" desktop feature,
it produces "freeglut (./a.out): Unable to create direct context rendering for window 'Hello World'
This may hurt performance." via stderr. The resulting window contains various garbage, loosely related to what was supposed to be drawn (despite sometimes the right picture is seen).

However, when the binary is started with all desktop effects shut down (this needs restarting session to take action),
the stderr output is
"get fences failed: -1
param: 6, val: 0"
and all works fine.

To conclude, glut with openGL don't work with Compiz desktop effects enabled.
For those, who would like to use glut anyhow, the obvious workaround is use no desktop effects while running the application(s).

Revision history for this message
Henrik S Törnblom (henrik-tornblom) wrote :

I confirm ZelinskiyIS findings. If I set the Visual effects to None in System -> Preferences -> Appearance. The OpenGL window decoration is visible otherwise not.

Revision history for this message
Matthias Klose (doko) wrote :

uploaded 2.6 to lucid. please recheck

Revision history for this message
Łukasz Różycki (lukasz-rozycki-agh) wrote :

I installed 2.6 in Karmic using deb from https://launchpad.net/ubuntu/+source/freeglut (amd64) and problem remains.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.