2007-04-07 Matthew Allum <mallum@openedhand.com>

* clutter/glx/clutter-backend-glx.c:
        Fix version check.
This commit is contained in:
Matthew Allum 2007-04-07 21:01:49 +00:00
parent 3944495569
commit 0085b75610

View File

@ -123,31 +123,12 @@ clutter_backend_glx_post_parse (ClutterBackend *backend,
static gboolean
is_gl_version_at_least_12 (void)
{
#define NON_VENDOR_VERSION_MAX_LEN 32
gchar non_vendor_version[NON_VENDOR_VERSION_MAX_LEN];
const gchar *version;
gint i = 0;
version = (const gchar*) glGetString (GL_VERSION);
while ( ((version[i] <= '9' && version[i] >= '0') || version[i] == '.')
&& i < NON_VENDOR_VERSION_MAX_LEN)
{
non_vendor_version[i] = version[i];
i++;
}
non_vendor_version[i] = '\0';
if (strstr (non_vendor_version, "1.0") == NULL &&
strstr (non_vendor_version, "1.0") == NULL)
return TRUE;
return FALSE;
{
/* FIXME: This likely needs to live elsewhere in features */
return
(g_ascii_strtod ((const gchar*) glGetString (GL_VERSION), NULL) >= 1.2);
}
static gboolean
clutter_backend_glx_init_stage (ClutterBackend *backend,
GError **error)