summaryrefslogtreecommitdiffstats
path: root/src/opengl/qgl_qpa.cpp
diff options
context:
space:
mode:
authorJørgen Lind <jorgen.lind@nokia.com>2010-08-06 05:53:28 (GMT)
committerJørgen Lind <jorgen.lind@nokia.com>2010-08-06 05:55:05 (GMT)
commita1f0a650578b71fddae9db05435715338b15ba35 (patch)
treeea3486b6c29d364c62c71703c5ea52c60678cded /src/opengl/qgl_qpa.cpp
parent1be2e830da7aa09f92d8cdca906f8a588cd10381 (diff)
downloadQt-a1f0a650578b71fddae9db05435715338b15ba35.zip
Qt-a1f0a650578b71fddae9db05435715338b15ba35.tar.gz
Qt-a1f0a650578b71fddae9db05435715338b15ba35.tar.bz2
Make the GLX integration give more correct format
Also create a correct window for the format.
Diffstat (limited to 'src/opengl/qgl_qpa.cpp')
-rw-r--r--src/opengl/qgl_qpa.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/opengl/qgl_qpa.cpp b/src/opengl/qgl_qpa.cpp
index 3d5b74f..5f0bca3 100644
--- a/src/opengl/qgl_qpa.cpp
+++ b/src/opengl/qgl_qpa.cpp
@@ -105,7 +105,8 @@ static QPlatformWindowFormat qt_glformat_to_platformwindowformat(const QGLFormat
retFormat.setRedBufferSize(format.redBufferSize());
retFormat.setRgba(format.rgba());
retFormat.setSampleBuffers(format.sampleBuffers());
- retFormat.setSamples(format.sampleBuffers());
+ if (format.samples() >= 0)
+ retFormat.setSamples(format.samples());
retFormat.setStencil(format.stencil());
if (format.stencilBufferSize() >= 0)
retFormat.setStencilBufferSize(format.stencilBufferSize());