mirror of
https://github.com/glfw/glfw.git
synced 2024-11-22 21:14:35 +00:00
Clarified WGL missing OpenGL error.
This commit is contained in:
parent
06289110e7
commit
ed98e06651
@ -272,9 +272,21 @@ static GLboolean choosePixelFormat(_GLFWwindow* window,
|
|||||||
usableCount++;
|
usableCount++;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!usableCount)
|
||||||
|
{
|
||||||
|
_glfwInputError(GLFW_API_UNAVAILABLE,
|
||||||
|
"WGL: The driver does not appear to support OpenGL");
|
||||||
|
|
||||||
|
free(usableConfigs);
|
||||||
|
return GL_FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
closest = _glfwChooseFBConfig(desired, usableConfigs, usableCount);
|
closest = _glfwChooseFBConfig(desired, usableConfigs, usableCount);
|
||||||
if (!closest)
|
if (!closest)
|
||||||
{
|
{
|
||||||
|
_glfwInputError(GLFW_PLATFORM_ERROR,
|
||||||
|
"WGL: Failed to find a suitable pixel format");
|
||||||
|
|
||||||
free(usableConfigs);
|
free(usableConfigs);
|
||||||
return GL_FALSE;
|
return GL_FALSE;
|
||||||
}
|
}
|
||||||
@ -355,11 +367,7 @@ int _glfwCreateContext(_GLFWwindow* window,
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (!choosePixelFormat(window, fbconfig, &pixelFormat))
|
if (!choosePixelFormat(window, fbconfig, &pixelFormat))
|
||||||
{
|
|
||||||
_glfwInputError(GLFW_PLATFORM_ERROR,
|
|
||||||
"WGL: Failed to find a suitable pixel format");
|
|
||||||
return GL_FALSE;
|
return GL_FALSE;
|
||||||
}
|
|
||||||
|
|
||||||
if (!DescribePixelFormat(window->wgl.dc, pixelFormat, sizeof(pfd), &pfd))
|
if (!DescribePixelFormat(window->wgl.dc, pixelFormat, sizeof(pfd), &pfd))
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user