Commit e87072e0 authored by Laurent Aimar's avatar Laurent Aimar

Added HasExtension() to search for an extension in opengl.

The code is based on CheckAPI from egl.c
parent 070c5b31
......@@ -56,6 +56,19 @@
# endif
#endif
static inline bool HasExtension(const char *apis, const char *api)
{
size_t apilen = strlen(api);
while (apis) {
while (*apis == ' ')
apis++;
if (!strncmp(apis, api, apilen) && memchr(" ", apis[apilen], 2))
return true;
apis = strchr(apis, ' ');
}
return false;
}
typedef struct vout_display_opengl_t vout_display_opengl_t;
vout_display_opengl_t *vout_display_opengl_New(video_format_t *fmt,
......
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