diff --git a/src/gui/rhi/qrhigles2.cpp b/src/gui/rhi/qrhigles2.cpp index 5efea342bf3..c9e412e2d44 100644 --- a/src/gui/rhi/qrhigles2.cpp +++ b/src/gui/rhi/qrhigles2.cpp @@ -5728,6 +5728,11 @@ bool QGles2Texture::create() rhiD->f->glTexStorage2D(target, mipLevelCount, glsizedintformat, size.width(), is1D ? qMax(0, m_arraySize) : size.height()); } + // Make sure the min filter is set to something non-mipmap-based already + // here, given the ridiculous default of GL. It is changed based on + // the sampler later, but there could be cases when one pulls the native + // object out via nativeTexture() right away. + rhiD->f->glTexParameteri(target, GL_TEXTURE_MIN_FILTER, GL_LINEAR); specified = true; } else { // Cannot use glCompressedTexImage2D without valid data, so defer.