summaryrefslogtreecommitdiffstats
path: root/src/opengl/gl2paintengineex
diff options
context:
space:
mode:
authorRhys Weatherley <rhys.weatherley@nokia.com>2010-02-15 23:03:42 (GMT)
committerRhys Weatherley <rhys.weatherley@nokia.com>2010-02-15 23:03:42 (GMT)
commite5a277fdd539c0de5e533b49a038e22929ace1dc (patch)
tree4d4d75b7913fe502572a73f856de98f3d25b1d27 /src/opengl/gl2paintengineex
parent2a271df9d242febfc735acfe239cdd6a7cc1471c (diff)
downloadQt-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/gl2paintengineex')
-rw-r--r--src/opengl/gl2paintengineex/qpaintengineex_opengl2.cpp4
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: