Commit 8de8aaf0 authored by Laszlo Agocs's avatar Laszlo Agocs

gl: do msaa renderbuffer only when samples > 1

parent f8b60490
......@@ -1963,7 +1963,7 @@ bool QGles2RenderBuffer::build()
switch (m_type) {
case QRhiRenderBuffer::DepthStencil:
if (rhiD->caps.msaaRenderBuffer)
if (rhiD->caps.msaaRenderBuffer && samples > 1)
rhiD->f->glRenderbufferStorageMultisample(GL_RENDERBUFFER, samples, GL_DEPTH24_STENCIL8,
m_pixelSize.width(), m_pixelSize.height());
else
......@@ -1972,7 +1972,7 @@ bool QGles2RenderBuffer::build()
QRHI_PROF_F(newRenderBuffer(this, false, false, samples));
break;
case QRhiRenderBuffer::Color:
if (rhiD->caps.msaaRenderBuffer)
if (rhiD->caps.msaaRenderBuffer && samples > 1)
rhiD->f->glRenderbufferStorageMultisample(GL_RENDERBUFFER, samples, GL_RGBA8,
m_pixelSize.width(), m_pixelSize.height());
else
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment