Docs: Add stereoscopic example to OpenGL examples

This fix uses the \ingroup command to add the stereoscopic example to the
examples-widgets-opengl group.

I also elaborated on the hardware requirements.

Fixes: QTBUG-119280
Pick-to: 6.5 6.6
Change-Id: I6d5b992e533b897d84100f0f897aae97ef89290f
Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
This commit is contained in:
Safiyyah Moosa 2023-11-22 11:53:52 +01:00
parent 1914f62c31
commit 11c522495d

View File

@ -5,8 +5,16 @@
\example stereoqopenglwidget
\title QOpenGLWidget Stereoscopic Rendering Example
\examplecategory {Graphics & Multimedia}
\brief This example shows how to create a minimal QOpenGLWidget based application
with stereoscopic rendering support.
\ingroup examples-widgets-opengl
\brief This example shows how to create a minimal QOpenGLWidget based
application with stereoscopic rendering support.
\note Support for stereoscopic rendering has certain hardware requirements,
such as, a graphics card with stereo support, 3D glasses and specific
monitors.
\note This example renders two images to two separate buffers. When you
view the images through 3D glasses, they give a 3D holographic effect.
\image stereoexample-leftbuffer.png
@ -16,9 +24,6 @@
The above image is what will be rendered to the right buffer.
\note Support for stereoscopic rendering has certain hardware requirements, like
your graphics card needs stereo support.
\section1 Setting the correct surface flag
To enable stereoscopic rendering you need to set the flag
QSurfaceFormat::StereoBuffers globally. Just doing it on the widget is not enough