summaryrefslogtreecommitdiffstats
path: root/src/openglwidgets/qopenglwidget.cpp
diff options
context:
space:
mode:
authorLaszlo Agocs <laszlo.agocs@qt.io>2023-03-15 12:11:15 +0100
committerLaszlo Agocs <laszlo.agocs@qt.io>2023-03-16 10:26:40 +0100
commit27ab0f012a1099267888ed0e8ab9700efffec0f4 (patch)
tree67d67be26481baf7533151399e37c587414569e4 /src/openglwidgets/qopenglwidget.cpp
parent9e18e5c869dbef1f0d9a79e899538ab680e14772 (diff)
Add QOpenGLWindow/Widget doc note about depth/stencil
Pick-to: 6.5 6.2 5.15 Fixes: QTBUG-108050 Change-Id: If011d6efff996870ff23eff3c2d1cf455d31b7a6 Reviewed-by: Kristoffer Skau <kristoffer.skau@qt.io> Reviewed-by: Andy Nichols <andy.nichols@qt.io>
Diffstat (limited to 'src/openglwidgets/qopenglwidget.cpp')
-rw-r--r--src/openglwidgets/qopenglwidget.cpp7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/openglwidgets/qopenglwidget.cpp b/src/openglwidgets/qopenglwidget.cpp
index 6c3a412219..d5f4e769d9 100644
--- a/src/openglwidgets/qopenglwidget.cpp
+++ b/src/openglwidgets/qopenglwidget.cpp
@@ -178,6 +178,13 @@ QT_BEGIN_NAMESPACE
\snippet code/doc_gui_widgets_qopenglwidget.cpp 2
+ \note It is up to the application to ensure depth and stencil buffers are
+ requested from the underlying windowing system interface. Without requesting
+ a non-zero depth buffer size there is no guarantee that a depth buffer will
+ be available, and as a result depth testing related OpenGL operations may
+ fail to function as expected. Commonly used depth and stencil buffer size
+ requests are 24 and 8, respectively.
+
With OpenGL 3.0+ contexts, when portability is not important, the versioned
QOpenGLFunctions variants give easy access to all the modern OpenGL functions
available in a given version: