Commit e5d995d8 authored by Alexandros Frantzis's avatar Alexandros Frantzis Committed by Alexandre Julliard

winewayland.drv: Implement wglGetExtensionsString{ARB,EXT}.

parent ea522c61
...@@ -44,6 +44,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(waylanddrv); ...@@ -44,6 +44,7 @@ WINE_DEFAULT_DEBUG_CHANNEL(waylanddrv);
static void *egl_handle; static void *egl_handle;
static struct opengl_funcs opengl_funcs; static struct opengl_funcs opengl_funcs;
static EGLDisplay egl_display; static EGLDisplay egl_display;
static char wgl_extensions[4096];
#define USE_GL_FUNC(name) #name, #define USE_GL_FUNC(name) #name,
static const char *opengl_func_names[] = { ALL_WGL_FUNCS }; static const char *opengl_func_names[] = { ALL_WGL_FUNCS };
...@@ -57,6 +58,18 @@ DECL_FUNCPTR(eglInitialize); ...@@ -57,6 +58,18 @@ DECL_FUNCPTR(eglInitialize);
DECL_FUNCPTR(eglQueryString); DECL_FUNCPTR(eglQueryString);
#undef DECL_FUNCPTR #undef DECL_FUNCPTR
static const char *wayland_wglGetExtensionsStringARB(HDC hdc)
{
TRACE("() returning \"%s\"\n", wgl_extensions);
return wgl_extensions;
}
static const char *wayland_wglGetExtensionsStringEXT(void)
{
TRACE("() returning \"%s\"\n", wgl_extensions);
return wgl_extensions;
}
static BOOL has_extension(const char *list, const char *ext) static BOOL has_extension(const char *list, const char *ext)
{ {
size_t len = strlen(ext); size_t len = strlen(ext);
...@@ -72,6 +85,13 @@ static BOOL has_extension(const char *list, const char *ext) ...@@ -72,6 +85,13 @@ static BOOL has_extension(const char *list, const char *ext)
return FALSE; return FALSE;
} }
static void register_extension(const char *ext)
{
if (wgl_extensions[0]) strcat(wgl_extensions, " ");
strcat(wgl_extensions, ext);
TRACE("%s\n", ext);
}
static BOOL init_opengl_funcs(void) static BOOL init_opengl_funcs(void)
{ {
unsigned int i; unsigned int i;
...@@ -85,6 +105,12 @@ static BOOL init_opengl_funcs(void) ...@@ -85,6 +105,12 @@ static BOOL init_opengl_funcs(void)
} }
} }
register_extension("WGL_ARB_extensions_string");
opengl_funcs.ext.p_wglGetExtensionsStringARB = wayland_wglGetExtensionsStringARB;
register_extension("WGL_EXT_extensions_string");
opengl_funcs.ext.p_wglGetExtensionsStringEXT = wayland_wglGetExtensionsStringEXT;
return TRUE; 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