return false;
}
- if (strstr(gl_extensions, name) || strstr(gl_platformextensions, name) || (strncmp(name, "GL_", 3) && strncmp(name, "WGL_", 4) && strncmp(name, "GLX_", 4) && strncmp(name, "AGL_", 4)))
+ if ((name[2] == '_' || name[3] == '_') && !strstr(gl_extensions ? gl_extensions : "", name) && !strstr(gl_platformextensions ? gl_platformextensions : "", name))
{
- for (func = funcs;func && func->name != NULL;func++)
+ Con_DPrint("not detected\n");
+ return false;
+ }
+
+ for (func = funcs;func && func->name != NULL;func++)
+ {
+ // functions are cleared before all the extensions are evaluated
+ if (!(*func->funcvariable = (void *) GL_GetProcAddress(func->name)))
{
- // functions are cleared before all the extensions are evaluated
- if (!(*func->funcvariable = (void *) GL_GetProcAddress(func->name)))
- {
- if (!silent)
- Con_DPrintf("OpenGL extension \"%s\" is missing function \"%s\" - broken driver!\n", name, func->name);
- failed = true;
- }
+ if (!silent)
+ Con_DPrintf("OpenGL extension \"%s\" is missing function \"%s\" - broken driver!\n", name, func->name);
+ failed = true;
}
- // delay the return so it prints all missing functions
- if (failed)
- return false;
- Con_DPrint("enabled\n");
- return true;
}
- else
- {
- Con_DPrint("not detected\n");
+ // delay the return so it prints all missing functions
+ if (failed)
return false;
- }
+ Con_DPrint("enabled\n");
+ return true;
}
static dllfunction_t opengl110funcs[] =
// start out at the final windowpass if samples is 1 as it's the only feature we need extended pixel formats for
for (windowpass = samples == 1;windowpass < 2;windowpass++)
{
+ gl_extensions = "";
+ gl_platformextensions = "";
+
mainwindow = CreateWindowEx (ExWindowStyle, "DarkPlacesWindowClass", gamename, WindowStyle, rect.left, rect.top, rect.right - rect.left, rect.bottom - rect.top, NULL, NULL, global_hInstance, NULL);
if (!mainwindow)
{
return false;
}
- gl_extensions = "";
- gl_platformextensions = "";
if (!GL_CheckExtension("wgl", wglfuncs, NULL, false))
{
VID_Shutdown();