diff options
author | Tor Arne Vestbø <tor.arne.vestbo@digia.com> | 2013-05-02 12:27:19 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-05-07 14:18:58 +0200 |
commit | 8dfeb1c374972f06759a92b4edc5d6a18b96ccec (patch) | |
tree | e7047c103af2356b09f86c403b43b48b90fb05f7 /src/plugins/platforms/ios/qioscontext.mm | |
parent | 95045168470f8865263145b86597b6641b4cc035 (diff) |
Don't use GL_REPEAT for image-brush drawing on OpenGL ES2
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.
This fixes missing/black backgrounds in the diagramscene example on iOS.
Change-Id: I5020090b5f17faeb06dcab9dc0292459e021af30
Reviewed-by: Richard Moe Gustavsen <richard.gustavsen@digia.com>
Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
Diffstat (limited to 'src/plugins/platforms/ios/qioscontext.mm')
0 files changed, 0 insertions, 0 deletions