Added initial ARB_robustness support.

This commit is contained in:
Camilla Berglund
2011-03-07 20:51:34 +01:00
parent fe1db15d31
commit d43e0b50d0
11 changed files with 113 additions and 6 deletions
+11
View File
@@ -320,6 +320,16 @@ GLboolean _glfwIsValidContextConfig(_GLFWwndconfig* wndconfig)
return GL_FALSE;
}
if (wndconfig->glRobustness)
{
if (wndconfig->glRobustness != GLFW_OPENGL_NO_RESET_NOTIFICATION &&
wndconfig->glRobustness != GLFW_OPENGL_LOSE_CONTEXT_ON_RESET)
{
_glfwSetError(GLFW_INVALID_VALUE, "glfwOpenWindow: Invalid OpenGL robustness mode requested");
return GL_FALSE;
}
}
return GL_TRUE;
}
@@ -335,6 +345,7 @@ GLboolean _glfwIsValidContext(_GLFWwindow* window, _GLFWwndconfig* wndconfig)
// As these are hard constraints when non-zero, we can simply copy them
window->glProfile = wndconfig->glProfile;
window->glForward = wndconfig->glForward;
window->glRobustness = wndconfig->glRobustness;
if (window->glMajor < wndconfig->glMajor ||
(window->glMajor == wndconfig->glMajor &&