aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorGunnar Sletta <gunnar.sletta@jollamobile.com>2014-04-15 07:23:57 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2014-04-15 14:28:35 +0200
commit3c560fcbff1de8e753b9f122b58cd105d6dc5140 (patch)
treed1a7439cad8e9f37c6696c518630d0b6299cd9b5 /src
parentff0857541d5d391c7c03cce5893b41dd9b35e7fa (diff)
Disable mipmap filtering by default in texture materials.
15999f14f146b5c04fb40b31b69ceeeece273430 changed QSGPlainTexture so it allows mipmap filtering by default. This requires a call to glGenerateMipmap() for textures to be valid, if mipmap filtering is used. Our texture materials follow the GL default which is to use the somewhat useless GL_NEAREST_MIPMAP_NEAREST. As a result we've had a number of bugs where textures are used and the call to glGenerateMipmap() is omitted. This happens for instance when using QQuickTexture::createTextureFromId(). Generating mipmaps by default is also a serious performance regression. To remedy this and minimize the impact on existing code, we disable mipmapping by default. [ChangeLog][QtQuick][SceneGraph] QSGTextureMaterial and QSGOpaqueTextureMaterial uses QSGTexture::None as default mipmap mode. Task-number: QTBUG-38321 Change-Id: Ia9d09fbcf710efb4575938053d0a2046f604a197 Reviewed-by: Caroline Chao <caroline.chao@digia.com> Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
Diffstat (limited to 'src')
-rw-r--r--src/quick/scenegraph/util/qsgtexturematerial.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/quick/scenegraph/util/qsgtexturematerial.cpp b/src/quick/scenegraph/util/qsgtexturematerial.cpp
index fcdb4fcdfe..afa535d322 100644
--- a/src/quick/scenegraph/util/qsgtexturematerial.cpp
+++ b/src/quick/scenegraph/util/qsgtexturematerial.cpp
@@ -152,7 +152,7 @@ void QSGOpaqueTextureMaterialShader::updateState(const RenderState &state, QSGMa
QSGOpaqueTextureMaterial::QSGOpaqueTextureMaterial()
: m_texture(0)
, m_filtering(QSGTexture::Nearest)
- , m_mipmap_filtering(QSGTexture::Nearest)
+ , m_mipmap_filtering(QSGTexture::None)
, m_horizontal_wrap(QSGTexture::ClampToEdge)
, m_vertical_wrap(QSGTexture::ClampToEdge)
{