*min = context->priv->gl_minor;
}
+/**
+ * gst_gl_context_check_gl_version:
+ * @context: a #GstGLContext
+ * @api: api type required
+ * @maj: major version required
+ * @min: minor version required
+ *
+ * Returns: whether OpenGL context implements the required api and specified
+ * version.
+ */
+gboolean
+gst_gl_context_check_gl_version (GstGLContext * context, GstGLAPI api,
+ gint maj, gint min)
+{
+ g_return_if_fail (GST_GL_IS_CONTEXT (context));
+
+ if (maj > context->priv->gl_major)
+ return FALSE;
+
+ if ((gst_gl_context_get_gl_api (context) & api) == GST_GL_API_NONE)
+ return FALSE;
+
+ if (maj < context->priv->gl_major)
+ return TRUE;
+
+ if (min > context->priv->gl_minor)
+ return FALSE;
+
+ return TRUE;
+}
+
/**
* gst_gl_context_check_feature:
* @context: a #GstGLContext
GstGLWindow * gst_gl_context_get_window (GstGLContext *context);
void gst_gl_context_get_gl_version (GstGLContext *context, gint *maj, gint *min);
+gboolean gst_gl_context_check_gl_version (GstGLContext * context, GstGLAPI api, gint maj, gint min);
gboolean gst_gl_context_check_feature (GstGLContext *context, const gchar *feature);
/* FIXME: remove */