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

Martin Otte otte at duke.edu
Mon Apr 20 22:52:50 PDT 2009


I have run into at least 2 glx programs that turn on windowed stereo  
mode by default if they query for a stereo visual and find that one  
is available. For example, here is a site that recommends setting  
enable_stereo to false if you get an error exactly like the one I  
had: http://mgltools.scripps.edu/documentation/faq/x-error-on-startup- 
mac-os-x

Since it is probably only a problem with Tiger where it reports that  
it can do stereo but in actuality can't do windowed stereo, this is  
not too big of a problem.

I assumed that re-implementing the global enable_stereo preference  
option would be the easiest option. An environment variable would  
also be ok if it didn't require . If there could be an easy way to  
disable the false reporting that stereo visuals are available in  
Tiger, this would be useful at least for me.

Thanks,
Martin


On Apr 11, 2009, at 6:45 PM, George Peter Staplin wrote:

> 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/
> _______________________________________________
> Xquartz-dev mailing list
> Xquartz-dev at lists.macosforge.org
> http://lists.macosforge.org/mailman/listinfo.cgi/xquartz-dev



More information about the Xquartz-dev mailing list