From a0264eb101ec38fdebc32673ef3d6a55c58b8399 Mon Sep 17 00:00:00 2001 From: Henri Verbeet Date: Thu, 15 Mar 2012 21:49:57 +0100 Subject: [PATCH] wined3d: Move the WGL extension detection code to the same place as regular GL extension detection. --- dlls/wined3d/directx.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/dlls/wined3d/directx.c b/dlls/wined3d/directx.c index f36c6ad446a..a00a42cc229 100644 --- a/dlls/wined3d/directx.c +++ b/dlls/wined3d/directx.c @@ -2452,6 +2452,16 @@ static BOOL wined3d_adapter_init_gl_caps(struct wined3d_adapter *adapter) /* Now work out what GL support this card really has */ load_gl_funcs( gl_info, gl_version ); + hdc = pwglGetCurrentDC(); + /* Not all GL drivers might offer WGL extensions e.g. VirtualBox. */ + if (GL_EXTCALL(wglGetExtensionsStringARB)) + WGL_Extensions = GL_EXTCALL(wglGetExtensionsStringARB(hdc)); + if (!WGL_Extensions) + WARN_(d3d_caps)("WGL extensions not supported.\n"); + else + parse_extension_string(gl_info, WGL_Extensions, wgl_extension_map, + sizeof(wgl_extension_map) / sizeof(*wgl_extension_map)); + ENTER_GL(); /* Now mark all the extensions supported which are included in the opengl core version. Do this *after* @@ -2843,16 +2853,6 @@ static BOOL wined3d_adapter_init_gl_caps(struct wined3d_adapter *adapter) gl_info->wrap_lookup[WINED3D_TADDRESS_MIRROR_ONCE - WINED3D_TADDRESS_WRAP] = gl_info->supported[ATI_TEXTURE_MIRROR_ONCE] ? GL_MIRROR_CLAMP_TO_EDGE_ATI : GL_REPEAT; - hdc = pwglGetCurrentDC(); - /* Not all GL drivers might offer WGL extensions e.g. VirtualBox. */ - if (GL_EXTCALL(wglGetExtensionsStringARB)) - WGL_Extensions = GL_EXTCALL(wglGetExtensionsStringARB(hdc)); - if (!WGL_Extensions) - WARN_(d3d_caps)("WGL extensions not supported.\n"); - else - parse_extension_string(gl_info, WGL_Extensions, wgl_extension_map, - sizeof(wgl_extension_map) / sizeof(*wgl_extension_map)); - fixup_extensions(gl_info, gl_renderer_str, gl_vendor, card_vendor, device); init_driver_info(driver_info, card_vendor, device); add_gl_compat_wrappers(gl_info); -- 2.11.4.GIT