[Xquartz-dev] GLX stereo and old hardware: request for enable_stereo

George Peter Staplin georgeps at xmission.com
Sat Apr 11 15:45:49 PDT 2009


Quoted Martin Otte <otte at duke.edu>:

> I just wanted to post a summary of my problem where the latest X11
> server on Tiger says that it can do stereo glx visuals, but any program
> that attempts to create a stereo window crashes.
>
> I tested with a non-X11 CGL program, and I get the same behavior. The
> problem is that my computer (Powerbook G4, OSX 10.4.11) advertises that
> opengl can do stereo, but it can only do stereo in full screen mode,
> not per-window.
>
> Since Apple's opengl says that it can do stereo, the X server sets up
> all of the stereo glx visuals. But just like the native CGL programs
> that I tried, any glx program that tries to create a windowed stereo
> visual crashes with an error because it is not full screen.
>
> I don't know if this is specifically a problem with Tiger or with older
> hardware. An old G4 tower with an ATI video card running 10.4 displays
> the same behaviour.
>
> I must have run into this problem before because I had set
> enable_stereo to false in my x11 preferences, but this option seems to
> be ignored with the recent X11 servers.
>
> Can you bring back the enable_stereo preference option? It should
> default to true it not set, but allow one to turn off stereo visuals if
> the older hardware wrongly advertises that it can do stereo.
>
> Thanks,
> Martin

Hi Martin,

Leopard can do windowed stereo.  Would it be an adequate solution if  
XQuartz offered a LIBGL_DISABLE_STEREO instead?

You could potentially set the LIBGL_DISABLE_STEREO in a Terminal like so:

env LIBGL_DISABLE_STEREO=1 /path/to/program

You could also add it to your global profile or system wide profile.

To me that seems slightly better than a global plist setting.  Most  
users that are using applications that request stereo support intend  
to have stereo.

Although Jeremy or I would need to think about the implications of  
adding this, and how it should fully behave.

I think this proposed option should probably restrict the GLX visual  
and fbconfig results to include only non-stereo results.  If we just  
didn't set the stereo flag when it was requested, applications could  
become confused when they use the GLX functions that query such  
attributes.  The stereo bit is set in the attributes for the fbconfig  
or visual, so it should probably be done in 2 paths, because the  
fbconfigs and visuals are fetched from the X server with 2 different  
requests.  In other words, I would just filter out the stereo  
fbconfigs and visuals.

The old enable_stereo plist setting worked by toggling stereo on or  
off, regardless of whether or not the hardware could support it, and  
it suffered from problems such as hard coding the visual attributes,  
rather than fetching the display's attributes.  So to change the  
setting involved quitting X11, using "defaults write" on the plist to  
set a boolean, and restarting X11.  This is rather awkward for some  
users, and some users may want to disable STEREO for only 1  
application, rather than all.


George
-- 
http://people.freedesktop.org/~gstaplin/


More information about the Xquartz-dev mailing list