summaryrefslogtreecommitdiffstats
path: root/src/opengl
diff options
context:
space:
mode:
authorRhys Weatherley <rhys.weatherley@nokia.com>2009-06-09 00:53:25 (GMT)
committerRhys Weatherley <rhys.weatherley@nokia.com>2009-06-09 00:53:25 (GMT)
commita359abb4ccf5a2dc3bd1fac9836231677b3dc14f (patch)
tree3cf83b6aa4982416c6201352bf4cbba89223bf3e /src/opengl
parent70283a0a87e46a8aa9d2e6296f4ed7c93cc230d6 (diff)
downloadQt-a359abb4ccf5a2dc3bd1fac9836231677b3dc14f.zip
Qt-a359abb4ccf5a2dc3bd1fac9836231677b3dc14f.tar.gz
Qt-a359abb4ccf5a2dc3bd1fac9836231677b3dc14f.tar.bz2
Protect EGL property names that only exist in some versions with #ifdefs
Reviewed-by: trustme
Diffstat (limited to 'src/opengl')
-rw-r--r--src/opengl/qegl.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/opengl/qegl.cpp b/src/opengl/qegl.cpp
index f1ae4ed..290f77c 100644
--- a/src/opengl/qegl.cpp
+++ b/src/opengl/qegl.cpp
@@ -413,12 +413,18 @@ int QEglProperties::value(int name) const
case EGL_RED_SIZE: return 0;
case EGL_GREEN_SIZE: return 0;
case EGL_BLUE_SIZE: return 0;
- case EGL_LUMINANCE_SIZE: return 0;
case EGL_ALPHA_SIZE: return 0;
+#if defined(EGL_LUMINANCE_SIZE)
+ case EGL_LUMINANCE_SIZE: return 0;
+#endif
+#if defined(EGL_ALPHA_MASK_SIZE)
case EGL_ALPHA_MASK_SIZE: return 0;
+#endif
case EGL_BIND_TO_TEXTURE_RGB: return EGL_DONT_CARE;
case EGL_BIND_TO_TEXTURE_RGBA: return EGL_DONT_CARE;
+#if defined(EGL_COLOR_BUFFER_TYPE)
case EGL_COLOR_BUFFER_TYPE: return EGL_RGB_BUFFER;
+#endif
case EGL_CONFIG_CAVEAT: return EGL_DONT_CARE;
case EGL_CONFIG_ID: return EGL_DONT_CARE;
case EGL_DEPTH_SIZE: return 0;
@@ -427,7 +433,9 @@ int QEglProperties::value(int name) const
case EGL_NATIVE_VISUAL_TYPE: return EGL_DONT_CARE;
case EGL_MAX_SWAP_INTERVAL: return EGL_DONT_CARE;
case EGL_MIN_SWAP_INTERVAL: return EGL_DONT_CARE;
+#if defined(EGL_RENDERABLE_TYPE)
case EGL_RENDERABLE_TYPE: return EGL_OPENGL_ES_BIT;
+#endif
case EGL_SAMPLE_BUFFERS: return 0;
case EGL_SAMPLES: return 0;
case EGL_STENCIL_SIZE: return 0;