WGL: Cleanup

This commit is contained in:
Camilla Löwy 2018-10-09 20:06:03 +02:00
parent fac7d531ec
commit 6bd264244a

View File

@ -300,29 +300,17 @@ static void swapIntervalWGL(int interval)
static int extensionSupportedWGL(const char* extension) static int extensionSupportedWGL(const char* extension)
{ {
const char* extensions; const char* extensions = NULL;
if (_glfw.wgl.GetExtensionsStringEXT)
{
extensions = _glfw.wgl.GetExtensionsStringEXT();
if (extensions)
{
if (_glfwStringInExtensionString(extension, extensions))
return GLFW_TRUE;
}
}
if (_glfw.wgl.GetExtensionsStringARB) if (_glfw.wgl.GetExtensionsStringARB)
{
extensions = _glfw.wgl.GetExtensionsStringARB(wglGetCurrentDC()); extensions = _glfw.wgl.GetExtensionsStringARB(wglGetCurrentDC());
if (extensions) else if (_glfw.wgl.GetExtensionsStringEXT)
{ extensions = _glfw.wgl.GetExtensionsStringEXT();
if (_glfwStringInExtensionString(extension, extensions))
return GLFW_TRUE;
}
}
return GLFW_FALSE; if (!extensions)
return GLFW_FALSE;
return _glfwStringInExtensionString(extension, extensions);
} }
static GLFWglproc getProcAddressWGL(const char* procname) static GLFWglproc getProcAddressWGL(const char* procname)