From 72558e810d9b3493dabfc936fa6c8bf3c3f3b49c Mon Sep 17 00:00:00 2001 From: Laszlo Agocs Date: Thu, 15 May 2014 19:00:15 +0200 Subject: Avoid setting unnecessary parameters in QOpenGLWidget MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit QOpenGLFramebufferObject sets the texture parameters already, do not set them again. Especially not GL_REPEAT, which is wrong and breaks on devices that do not support REPEAT on NPOT textures. What QOpenGLFramebufferObject does is just fine (it sets NEAREST/ NEAREST and CLAMP_TO_EDGE). This is important for WebEngine where the QWidget-based web view is using QOpenGLWidget. Change-Id: I264d30118ce7adf50f68f2c7b9a5599a406b4362 Reviewed-by: Jørgen Lind --- src/widgets/kernel/qopenglwidget.cpp | 6 ------ 1 file changed, 6 deletions(-) (limited to 'src/widgets/kernel/qopenglwidget.cpp') diff --git a/src/widgets/kernel/qopenglwidget.cpp b/src/widgets/kernel/qopenglwidget.cpp index cbefb8a6bf..307d0bb909 100644 --- a/src/widgets/kernel/qopenglwidget.cpp +++ b/src/widgets/kernel/qopenglwidget.cpp @@ -170,12 +170,6 @@ void QOpenGLWidget::resizeEvent(QResizeEvent *) d->fbo = new QOpenGLFramebufferObject(size() * devicePixelRatio(), QOpenGLFramebufferObject::CombinedDepthStencil); d->fbo->bind(); QOpenGLFunctions *funcs = d->context.functions(); - funcs->glBindTexture(GL_TEXTURE_2D, d->fbo->texture()); - funcs->glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST); - funcs->glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST); - funcs->glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT); - funcs->glTexParameterf(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT); - resizeGL(width(), height()); paintGL(); funcs->glFlush(); -- cgit v1.2.3