diff options
author | Trond Kjernåsen <trond@trolltech.com> | 2009-08-17 15:45:43 +0200 |
---|---|---|
committer | Trond Kjernåsen <trond@trolltech.com> | 2009-08-17 15:52:09 +0200 |
commit | 53807e58770f27d46ca8ecaa33a3d5f7b6925517 (patch) | |
tree | afa7ccf8c1e635e41c0b1dc898077011573b8b89 /src/opengl/gl2paintengineex/qglengineshadersource_p.h | |
parent | d0b0f7b5b44fbec26a67b4afb3a08143b5de4b57 (diff) |
Fixed text rendering on GL ES 2 implementations.
Some GL ES 2 implementations seem to have problems with
glCopyTexSubImage2D(), so we fall back and read the old font texture
into system memory and re-upload the new font texture.
Also, the precision used for texture coordinates in the fragment
programs wasn't high enough, which could lead to rendering artifacts.
Reviewed-by: Samuel
Diffstat (limited to 'src/opengl/gl2paintengineex/qglengineshadersource_p.h')
-rw-r--r-- | src/opengl/gl2paintengineex/qglengineshadersource_p.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/opengl/gl2paintengineex/qglengineshadersource_p.h b/src/opengl/gl2paintengineex/qglengineshadersource_p.h index b0b91ae897..c80d6e176c 100644 --- a/src/opengl/gl2paintengineex/qglengineshadersource_p.h +++ b/src/opengl/gl2paintengineex/qglengineshadersource_p.h @@ -73,8 +73,8 @@ static const char* const qglslMainVertexShader = "\ }"; static const char* const qglslMainWithTexCoordsVertexShader = "\ - attribute lowp vec2 textureCoordArray; \ - varying lowp vec2 textureCoords; \ + attribute mediump vec2 textureCoordArray; \ + varying mediump vec2 textureCoords; \ uniform highp float depth;\ void setPosition();\ void main(void) \ @@ -284,7 +284,7 @@ static const char* const qglslSolidBrushSrcFragmentShader = "\ }"; static const char* const qglslImageSrcFragmentShader = "\ - varying highp vec2 textureCoords; \ + varying mediump vec2 textureCoords; \ uniform sampler2D imageTexture; \ lowp vec4 srcPixel() { \ return texture2D(imageTexture, textureCoords); \ |