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

@ -124,30 +124,11 @@ clutter_backend_glx_post_parse (ClutterBackend *backend,
static gboolean static gboolean
is_gl_version_at_least_12 (void) is_gl_version_at_least_12 (void)
{ {
#define NON_VENDOR_VERSION_MAX_LEN 32 /* FIXME: This likely needs to live elsewhere in features */
gchar non_vendor_version[NON_VENDOR_VERSION_MAX_LEN]; return
const gchar *version; (g_ascii_strtod ((const gchar*) glGetString (GL_VERSION), NULL) >= 1.2);
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;
} }
static gboolean static gboolean
clutter_backend_glx_init_stage (ClutterBackend *backend, clutter_backend_glx_init_stage (ClutterBackend *backend,
GError **error) GError **error)