[waffle] [PATCH] wgl: Fix requirements for creation of ES2 context

Chad Versace chad.versace at linux.intel.com
Fri Dec 5 16:52:25 PST 2014


To create an ES2 context, Waffle required
WGL_EXT_create_context_es2_profile. Fix Waffle to require either
WGL_EXT_create_context_es_profile *or*
WGL_EXT_create_context_es2_profile, because
WGL_EXT_create_context_es_profile is an updated variant of
WGL_EXT_create_context_es2_profile that supercedes it.

Cc: José Fonseca <jfonseca at vmware.com>
Cc: Emil Velikov <emil.l.velikov at gmail.com>
Fixes #23: https://github.com/waffle-gl/waffle/issues/23
Signed-off-by: Chad Versace <chad.versace at linux.intel.com>
---

Totally untested. I don't have MinGW setup right now. Windows people, please
let know if this patch compiles.

 src/waffle/wgl/wgl_config.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/src/waffle/wgl/wgl_config.c b/src/waffle/wgl/wgl_config.c
index 9dea991..59a70a6 100644
--- a/src/waffle/wgl/wgl_config.c
+++ b/src/waffle/wgl/wgl_config.c
@@ -118,8 +118,10 @@ wgl_config_check_context_attrs(struct wgl_display *dpy,
             assert(attrs->context_major_version == 2);
             assert(!attrs->context_forward_compatible);
 
-            if (!dpy->EXT_create_context_es2_profile) {
+            if (!dpy->EXT_create_context_es2_profile
+                && !dpy->EXT_create_context_es_profile) {
                 wcore_errorf(WAFFLE_ERROR_UNSUPPORTED_ON_PLATFORM,
+                             "WGL_EXT_create_context_es_profile or "
                              "WGL_EXT_create_context_es2_profile is required "
                              "to create an OpenGL ES2 context");
                 return false;
-- 
2.1.2.1.g5433a3e



More information about the waffle mailing list