summaryrefslogtreecommitdiffstats
path: root/src/opengl/qgl.cpp
diff options
context:
space:
mode:
authorAllan Sandfeld Jensen <allan.jensen@digia.com>2014-04-23 15:20:33 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2014-04-25 15:18:29 +0200
commit8ab1323842433fb6b45e7d6f381b4b9710a81da9 (patch)
tree9956337e84f7b75d5ff44c56f5cd0c1e0617f175 /src/opengl/qgl.cpp
parent8369f6d3eae93293540ab8ed6f4ff1cc444cb6be (diff)
Don't use GL_REPEAT for image-brush drawing on OpenGL ES2
Backport of commit 8dfeb1c374972f06759a92b4edc5d6a18b96ccec in QtGui to the same class in the QtOpenGL module. OpenGL ES2 doesn't support NPOT textures in combination with GL_REPEAT, so for OpenGL ES2 we use a custom program that emulates repeat by taking the fractional part of the texture coordinates. This is not enough though, as merely setting GL_TEXTURE_WRAP_x to GL_REPEAT with a NPOT texture is an error in some implementations, so we have to guard the call to updateTextureFilter() in updateBrushTexture() with a check for OpenGL ES2 and use GL_CLAMP_TO_EDGE instead. Change-Id: Icbdd784c2c6d562849679f87da18b20d5441f389 Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com>
Diffstat (limited to 'src/opengl/qgl.cpp')
0 files changed, 0 insertions, 0 deletions