Query for OpenGL Stereo Capability

Vadim Zeitlin vadim at wxwidgets.org
Tue Dec 4 11:59:17 PST 2007


On Tue, 4 Dec 2007 06:30:22 -0800 (PST) crjjrc <crjjrc at gmail.com> wrote:

c> On Oct 19, 10:23 am, va... at wxwidgets.org (Vadim Zeitlin) wrote:
c> > On Fri, 19 Oct 2007 08:46:25 -0700 crjjrc <crj... at gmail.com> wrote:
c> >
c> > c> Is there anyway in wxWidgets to query whether a wxGLCanvas can support
c> > c>stereo rendering?
c> >
c> >  I am not a GL expert but I don't think there is any way to test this using
c> > wx. We should definitely expose a method to do it and implementing it
c> > should be almost trivial (especially in the svn trunk where the GL code was
c> > refactored and is much more concise and clear), so any patches implementing
c> > this would surely be welcome.
c> 
c> I'm reviving an old post here.  It seems that we could effectively
c> query for OpenGL stereo rendering support if the two-stage creation
c> mechanism was still allowed for wxGLCanvas.  The Create() function for
c> the wxGLCanvas seems to provide the functionality we need (and also
c> does the initialization we'd want) and returns a boolean indicating
c> success.  Just checking the return value would tell us if a visual was
c> supported.

 I don't think it's a good idea to tell people to try to call Create() and
assume an attribute (which one? what if there are 2 optionally supported
attributes in the attributes list?) isn't supported if it fails. It would
be really better (meaning more clear and more efficient) to just add a
static method checking for a concrete attribute support -- I'm pretty sure
there was a way to do it in OpenGL, wasn't there?

 Regards,
VZ

-- 
TT-Solutions: wxWidgets consultancy and technical support
               http://www.tt-solutions.com/





More information about the wx-users mailing list