Module: wine Branch: master Commit: a0264eb101ec38fdebc32673ef3d6a55c58b8399 URL: http://source.winehq.org/git/wine.git/?a=commit;h=a0264eb101ec38fdebc32673ef...
Author: Henri Verbeet hverbeet@codeweavers.com Date: Thu Mar 15 21:49:57 2012 +0100
wined3d: Move the WGL extension detection code to the same place as regular GL extension detection.
---
dlls/wined3d/directx.c | 20 ++++++++++---------- 1 files changed, 10 insertions(+), 10 deletions(-)
diff --git a/dlls/wined3d/directx.c b/dlls/wined3d/directx.c index f36c6ad..a00a42c 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);