mirror of
https://github.com/glfw/glfw.git
synced 2024-11-29 21:37:27 +00:00
Added profile enum verification.
This commit is contained in:
parent
6d7d11643a
commit
0d50ee749f
@ -169,6 +169,13 @@ static GLboolean isValidContextConfig(_GLFWwndconfig* wndconfig)
|
|||||||
}
|
}
|
||||||
else if (wndconfig->glProfile)
|
else if (wndconfig->glProfile)
|
||||||
{
|
{
|
||||||
|
if (wndconfig->glProfile != GLFW_OPENGL_CORE_PROFILE &&
|
||||||
|
wndconfig->glProfile != GLFW_OPENGL_COMPAT_PROFILE)
|
||||||
|
{
|
||||||
|
_glfwSetError(GLFW_INVALID_ENUM, "glfwOpenWindow: Invalid OpenGL profile");
|
||||||
|
return GL_FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
if (wndconfig->glMajor < 3 || (wndconfig->glMajor == 3 && wndconfig->glMinor < 2))
|
if (wndconfig->glMajor < 3 || (wndconfig->glMajor == 3 && wndconfig->glMinor < 2))
|
||||||
{
|
{
|
||||||
// Desktop OpenGL context profiles are only defined for version 3.2
|
// Desktop OpenGL context profiles are only defined for version 3.2
|
||||||
|
Loading…
Reference in New Issue
Block a user