From 7ddf13c8fba2aadf00c0d6c822c6b4acbd3bd54f Mon Sep 17 00:00:00 2001 From: Tom Cooksey Date: Wed, 10 Mar 2010 13:34:52 +0100 Subject: Make calls to QGLFormat::set*BufferSize also update flags Reviewed-By: Trond --- src/opengl/qgl.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/opengl/qgl.cpp b/src/opengl/qgl.cpp index 73cd6a8..7839191 100644 --- a/src/opengl/qgl.cpp +++ b/src/opengl/qgl.cpp @@ -766,6 +766,7 @@ void QGLFormat::setSamples(int numSamples) return; } d->numSamples = numSamples; + setSampleBuffers(numSamples > 0); } /*! @@ -904,6 +905,7 @@ void QGLFormat::setDepthBufferSize(int size) return; } d->depthSize = size; + setDepth(size > 0); } /*! @@ -1017,7 +1019,7 @@ void QGLFormat::setAlphaBufferSize(int size) return; } d->alphaSize = size; - setOption(QGL::AlphaChannel); + setAlpha(size > 0); } /*! @@ -1044,6 +1046,7 @@ void QGLFormat::setAccumBufferSize(int size) return; } d->accumSize = size; + setAccum(size > 0); } /*! @@ -1069,6 +1072,7 @@ void QGLFormat::setStencilBufferSize(int size) return; } d->stencilSize = size; + setStencil(size > 0); } /*! -- cgit v0.12