diff options
author | Rhys Weatherley <rhys.weatherley@nokia.com> | 2010-02-15 23:03:42 (GMT) |
---|---|---|
committer | Rhys Weatherley <rhys.weatherley@nokia.com> | 2010-02-15 23:03:42 (GMT) |
commit | e5a277fdd539c0de5e533b49a038e22929ace1dc (patch) | |
tree | 4d4d75b7913fe502572a73f856de98f3d25b1d27 /src/opengl | |
parent | 2a271df9d242febfc735acfe239cdd6a7cc1471c (diff) | |
download | Qt-e5a277fdd539c0de5e533b49a038e22929ace1dc.zip Qt-e5a277fdd539c0de5e533b49a038e22929ace1dc.tar.gz Qt-e5a277fdd539c0de5e533b49a038e22929ace1dc.tar.bz2 |
Fix alpha check for OpenGL/ES in GL2 paint engine
GL_RGB5 and GL_RGB8 don't exist on OpenGL/ES systems.
Reviewed-by: Julian de Bhal
Diffstat (limited to 'src/opengl')
-rw-r--r-- | src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp b/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp index 12ac69d..74ec97b 100644 --- a/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp +++ b/src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp @@ -1750,7 +1750,11 @@ bool QGL2PaintEngineEx::begin(QPaintDevice *pdev) case QInternal::FramebufferObject: { GLenum f = static_cast<QGLFramebufferObject *>(pdev)->format().internalTextureFormat(); +#ifndef QT_OPENGL_ES d->deviceHasAlpha = (f != GL_RGB && f != GL_RGB5 && f != GL_RGB8); +#else + d->deviceHasAlpha = (f == GL_RGBA); +#endif } break; default: |