Commit 5666522a authored by Emmanuele Bassi's avatar Emmanuele Bassi

gl: Fix the required version setter

We don't allow a version tuple to be lower than (3, 2), but we should
allow versions above that.

https://bugzilla.gnome.org/show_bug.cgi?id=744212
parent 60195ab0
......@@ -523,8 +523,21 @@ gdk_gl_context_set_required_version (GdkGLContext *context,
g_return_if_fail (GDK_IS_GL_CONTEXT (context));
g_return_if_fail (!priv->realized);
/* this will take care of the default */
if (major == 0 && minor == 0)
{
priv->major = 0;
priv->minor = 0;
return;
}
priv->major = MAX (major, 3);
priv->minor = MAX (minor, 2);
/* we only support versions ≥ 3.2 */
if (priv->major == 3)
priv->minor = MAX (minor, 2);
else
priv->minor = minor;
}
/**
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment