Commit 14011c14 authored by Jason Ekstrand's avatar Jason Ekstrand Committed by chadversary

egl: Add a macro for extension checking

Reviewed-by: chadversary's avatarChad Versace <chad@kiwitree.net>
parent 621715c4
......@@ -84,8 +84,13 @@ get_extensions(struct wegl_display *dpy)
// pending emission.
assert(wcore_error_get_code() == 0);
dpy->EXT_create_context_robustness = waffle_is_extension_in_string(extensions, "EGL_EXT_create_context_robustness");
dpy->KHR_create_context = waffle_is_extension_in_string(extensions, "EGL_KHR_create_context");
#define CHECK_EXTENSION(ext) \
dpy->ext = waffle_is_extension_in_string(extensions, "EGL_" #ext)
CHECK_EXTENSION(EXT_create_context_robustness);
CHECK_EXTENSION(KHR_create_context);
#undef CHECK_EXTENSION
return true;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment