From c25a792902f71c16c7bd4e09662319f7172d1df9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stefan=20D=C3=B6singer?= Date: Tue, 6 Nov 2007 13:20:27 +0100 Subject: [PATCH] wined3d: Mark extensions supported which are included in the gl core. --- dlls/wined3d/directx.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/dlls/wined3d/directx.c b/dlls/wined3d/directx.c index b1c319c033c..62db2bd96c2 100644 --- a/dlls/wined3d/directx.c +++ b/dlls/wined3d/directx.c @@ -706,6 +706,18 @@ BOOL IWineD3DImpl_FillGLCaps(WineD3D_GL_Info *gl_info) { WGL_EXT_FUNCS_GEN; #undef USE_GL_FUNC + /* Now mark all the extensions supported which are included in the opengl core version. Do this *after* + * loading the functions, otherwise the code above will load the extension entry points instead of the + * core functions, which may not work + */ + for (i = 0; i < (sizeof(EXTENSION_MAP) / sizeof(*EXTENSION_MAP)); ++i) { + if (gl_info->supported[EXTENSION_MAP[i].extension] == FALSE && + EXTENSION_MAP[i].version <= gl_info->gl_driver_version && EXTENSION_MAP[i].version) { + TRACE_(d3d_caps)(" GL CORE: %s support\n", EXTENSION_MAP[i].extension_string); + gl_info->supported[EXTENSION_MAP[i].extension] = TRUE; + } + } + if (gl_info->supported[APPLE_FENCE]) { /* GL_NV_fence and GL_APPLE_fence provide the same functionality basically. * The apple extension interacts with some other apple exts. Disable the NV