[Interest] QOpenGLWidget and quad-buffer stereo

Tilmann Krueger tilmann_krueger at trimble.com
Fri Dec 20 14:57:54 CET 2019


Hi,

we tried to modify the hellogl2 example of Qt 5.12.4 to render in stereo.

However, calling the QOpenGLFunctions_3_2_Core::drawBuffer() function
doesn't have any effect (actually, that's not quite true, as it yields
GL_INVALID_OPERATION).

The funny thing is, that the context (or actually widget) creation with

    QSurfaceFormat fmt;
    fmt.setOptions( QSurfaceFormat::StereoBuffers );
    fmt.setStereo( true );
    QSurfaceFormat::setDefaultFormat( fmt );

seems to work, since the graphics head correctly activates its stereo
rendering capabilities as soon as the application starts, but it seems that
just one buffer is rendered (I think it's the right one, as this is
rendered last).

So the basic stuff seems to be there, it's probably just the QOpenGLWidget
that doesn't respond as expected.

Googling the matter yields a tip in QTBUG-64587 to use QOpenGLWindow
instead, but this is not an option, as this was meant as a proof of concept
towards replacing QGLWidget with QOpenGLWidget in a rather large and
complex application.

Are we doing something wrong? How is one supposed to set this up correctly?
Or are we really stuck with QGLWidget?

All tried with a Windows 10 1903, with Quadro FX 4600 and a nvidia 3d
vision compatible display from Acer.

Best Regards / Mit freundlichen Grüßen
Tilmann Krüger

--
Software Engineer | Trimble Geospatial Division
Stuttgart, Germany | Rotebühlstraße 81, 70178
Office +49 711 2288110 | Fax +49 711 2288111
tilmann_krueger at trimble.com

Trimble Germany GmbH, Am Prime Parc 11, 65479 Raunheim
Eingetragen beim Amtsgericht Darmstadt unter HRB 83893
Geschäftsführer: Dr. Frank Heimberg, Jürgen Kesper
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.qt-project.org/pipermail/interest/attachments/20191220/ec1ba177/attachment.html>


More information about the Interest mailing list