Index: qopenglwidget.cpp =================================================================== --- qopenglwidget.cpp (revision 6869) +++ qopenglwidget.cpp (working copy) @@ -697,7 +697,11 @@ QOpenGLFramebufferObjectFormat format; format.setAttachment(QOpenGLFramebufferObject::CombinedDepthStencil); format.setSamples(samples); - + // Check if GL context supports more than 8 bit color depth: + if ((samples <= 1) && (context->format().redBufferSize() > 8)) { + // we need an internal texture format which can store the higher bit depth: + format.setInternalTextureFormat(GL_RGB10_A2); + } const QSize deviceSize = q->size() * q->devicePixelRatioF(); fbo = new QOpenGLFramebufferObject(deviceSize, format); if (samples > 0)