summaryrefslogtreecommitdiffstats
path: root/src/opengl/qgl_qpa.cpp
diff options
context:
space:
mode:
authorJørgen Lind <jorgen.lind@nokia.com>2010-08-06 07:53:28 +0200
committerJørgen Lind <jorgen.lind@nokia.com>2010-08-06 07:55:05 +0200
commita1f0a650578b71fddae9db05435715338b15ba35 (patch)
treeea3486b6c29d364c62c71703c5ea52c60678cded /src/opengl/qgl_qpa.cpp
parent1be2e830da7aa09f92d8cdca906f8a588cd10381 (diff)
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 3d5b74f95a..5f0bca3ab9 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());