diff options
author | Kurt Pattyn <pattyn.kurt@gmail.com> | 2014-03-11 14:12:46 +0100 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2014-03-19 20:12:08 +0100 |
commit | 3ff15f1e987e59b5c35224d7f2230905c4a5f3d0 (patch) | |
tree | 9a675c2cc8f11ec22c69d3a27474841e06c34c91 /src/gui/kernel | |
parent | 379238496d0bf339a717a311e91949deb2e45485 (diff) |
QOpenGLContext: Use color depth information from QSurfaceFormat
When a new QOpenGLContext is requested, the color depth
information is now also taken into account on OS X and WGL.
Task-number: QTBUG-37411
Change-Id: I69d04989a20de3ace041b009fbbdc03fa02cfdf8
Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>
Diffstat (limited to 'src/gui/kernel')
-rw-r--r-- | src/gui/kernel/qsurfaceformat.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/gui/kernel/qsurfaceformat.cpp b/src/gui/kernel/qsurfaceformat.cpp index 2b6cb2d949..23c0e59779 100644 --- a/src/gui/kernel/qsurfaceformat.cpp +++ b/src/gui/kernel/qsurfaceformat.cpp @@ -522,6 +522,10 @@ int QSurfaceFormat::alphaBufferSize() const /*! Set the desired \a size in bits of the red channel of the color buffer. + + \note On Mac OSX, be sure to set the buffer size of all color channels, + otherwise this setting will have no effect. If one of the buffer sizes is not set, + the current bit-depth of the screen is used. */ void QSurfaceFormat::setRedBufferSize(int size) { @@ -533,6 +537,10 @@ void QSurfaceFormat::setRedBufferSize(int size) /*! Set the desired \a size in bits of the green channel of the color buffer. + + \note On Mac OSX, be sure to set the buffer size of all color channels, + otherwise this setting will have no effect. If one of the buffer sizes is not set, + the current bit-depth of the screen is used. */ void QSurfaceFormat::setGreenBufferSize(int size) { @@ -544,6 +552,10 @@ void QSurfaceFormat::setGreenBufferSize(int size) /*! Set the desired \a size in bits of the blue channel of the color buffer. + + \note On Mac OSX, be sure to set the buffer size of all color channels, + otherwise this setting will have no effect. If one of the buffer sizes is not set, + the current bit-depth of the screen is used. */ void QSurfaceFormat::setBlueBufferSize(int size) { |