QOpenGLTexture: Enable multisample 2D textures on GLES 3.1+

Task-number: QTBUG-68510
Change-Id: Ib224189906b595bbae5aab95c888dd13e94171aa
Reviewed-by: Andy Nichols <andy.nichols@qt.io>
This commit is contained in:
Laszlo Agocs 2018-05-22 13:47:31 +02:00
parent 28ab81158f
commit 6a14608742

View File

@ -188,6 +188,12 @@ QOpenGLTextureHelper::QOpenGLTextureHelper(QOpenGLContext *context)
TexBufferRange = 0;
TextureView = 0;
// OpenGL ES 3.1+ has TexStorage2DMultisample
if (ctx->format().version() >= qMakePair(3, 1)) {
QOpenGLExtraFunctionsPrivate *extra = static_cast<QOpenGLExtensions *>(context->extraFunctions())->d();
TexStorage2DMultisample = extra->f.TexStorage2DMultisample;
}
#endif
if (context->isOpenGLES() && context->hasExtension(QByteArrayLiteral("GL_OES_texture_3D"))) {