summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel/qopenglwindow.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/kernel/qopenglwindow.cpp')
-rw-r--r--src/gui/kernel/qopenglwindow.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/gui/kernel/qopenglwindow.cpp b/src/gui/kernel/qopenglwindow.cpp
index 37db608430..8ab5c08442 100644
--- a/src/gui/kernel/qopenglwindow.cpp
+++ b/src/gui/kernel/qopenglwindow.cpp
@@ -252,9 +252,10 @@ void QOpenGLWindowPrivate::beginPaint(const QRegion &region)
if (!fbo || fbo->size() != deviceSize) {
QOpenGLFramebufferObjectFormat fboFormat;
fboFormat.setAttachment(QOpenGLFramebufferObject::CombinedDepthStencil);
- if (q->requestedFormat().samples() > 0) {
+ const int samples = q->requestedFormat().samples();
+ if (samples > 0) {
if (updateBehavior != QOpenGLWindow::PartialUpdateBlend)
- fboFormat.setSamples(q->requestedFormat().samples());
+ fboFormat.setSamples(samples);
else
qWarning("QOpenGLWindow: PartialUpdateBlend does not support multisampling");
}