mirror of
https://github.com/glfw/glfw.git
synced 2024-11-10 00:51:47 +00:00
Removed broken GL 3.2 dependency.
This commit is contained in:
parent
4c1713d714
commit
e5ef93d5ae
25
src/window.c
25
src/window.c
@ -549,7 +549,10 @@ GLFWAPI GLFWwindow glfwOpenWindow(int width, int height,
|
||||
glfwMakeWindowCurrent(window);
|
||||
_glfwPlatformRefreshWindowParams();
|
||||
|
||||
// Get OpenGL version
|
||||
// As these are hard constraints when non-zero, we can simply copy them
|
||||
window->glProfile = wndconfig.glProfile;
|
||||
window->glForward = wndconfig.glForward;
|
||||
|
||||
_glfwParseGLVersion(&window->glMajor, &window->glMinor, &window->glRevision);
|
||||
|
||||
if (window->glMajor < wndconfig.glMajor ||
|
||||
@ -574,26 +577,6 @@ GLFWAPI GLFWwindow glfwOpenWindow(int width, int height,
|
||||
}
|
||||
}
|
||||
|
||||
if (window->glMajor >= 3)
|
||||
{
|
||||
GLint flags;
|
||||
glGetIntegerv(GL_CONTEXT_FLAGS, &flags);
|
||||
|
||||
if (flags & GL_CONTEXT_FLAG_FORWARD_COMPATIBLE_BIT)
|
||||
window->glForward = GL_TRUE;
|
||||
}
|
||||
|
||||
if (window->glMajor > 3 || (window->glMajor == 3 && window->glMinor >= 2))
|
||||
{
|
||||
GLint mask;
|
||||
glGetIntegerv(GL_CONTEXT_PROFILE_MASK, &mask);
|
||||
|
||||
if (mask & GL_CONTEXT_COMPATIBILITY_PROFILE_BIT)
|
||||
window->glProfile = GLFW_OPENGL_COMPAT_PROFILE;
|
||||
else if (mask & GL_CONTEXT_CORE_PROFILE_BIT)
|
||||
window->glProfile = GLFW_OPENGL_CORE_PROFILE;
|
||||
}
|
||||
|
||||
// If full-screen mode was requested, disable mouse cursor
|
||||
if (mode == GLFW_FULLSCREEN)
|
||||
glfwDisable(window, GLFW_MOUSE_CURSOR);
|
||||
|
Loading…
Reference in New Issue
Block a user