summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorJohan Klokkhammer Helsing <johan.helsing@qt.io>2018-04-03 14:42:15 +0200
committerJohan Helsing <johan.helsing@qt.io>2018-04-06 12:47:11 +0000
commitfbb9c0461c14196ac7100c90088c15263d0cccbb (patch)
tree1b17e3eb66e1e95a3abd6799cd592bd9eb914f1b /tests
parentd90fb72c201efde8f9fc10c4fb4a542b1a26b9e8 (diff)
QOpenGLTexture: Set wrap mode if NPOT textures are not fully supported
The OpenGL wrap mode defaults to GL_REPEAT although it is not supported for non-power-of-two textures on hardware that only has limited support. I.e. the following would create a texture with an invalid wrap mode: auto *t = new QOpenGLTexture(QOpenGLTexture::Target2D); t.setSize(123, 456); This patch adds a check in QOpenGLWindow::setSize to see if it's called with a non-power-of-two size on hardware without full support, and if so sets wrapMode to ClampToEdge (which should work on devices with limited support). Task-number: QTBUG-67418 Change-Id: I56e9f4383dbf5430c2bc5e4e9e585712b3603c13 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
Diffstat (limited to 'tests')
0 files changed, 0 insertions, 0 deletions