Fix bug in multisampling handling when converting from surface format

Task-number: QTBUG-28875

Change-Id: If72ce0669de8f344603d2da53eeb5644bd5c4f82
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Reviewed-by: Jonathan Liu <net147@gmail.com>
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
This commit is contained in:
Sean Harmer 2012-12-31 12:56:56 +00:00 committed by The Qt Project
parent db25efe78b
commit aa90f78a34

View File

@ -70,8 +70,8 @@ QGLFormat QGLFormat::fromSurfaceFormat(const QSurfaceFormat &format)
if (format.depthBufferSize() >= 0)
retFormat.setDepthBufferSize(format.depthBufferSize());
if (format.samples() > 1) {
retFormat.setSampleBuffers(format.samples());
retFormat.setSamples(true);
retFormat.setSampleBuffers(true);
retFormat.setSamples(format.samples());
}
if (format.stencilBufferSize() > 0) {
retFormat.setStencil(true);