forked from AuroraMiddleware/gtk
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
This commit is contained in:
parent
60195ab021
commit
5666522ab3
@ -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;
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user