winewayland.drv: Implement wglGetExtensionsString{ARB,EXT}.
This commit is contained in:
parent
ea522c6135
commit
e5d995d826
1 changed files with 26 additions and 0 deletions
|
@ -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);
|
||||||
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)
|
||||||
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)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue