feature: Make sure we have a GL context
authorEmmanuele Bassi <ebassi@linux.intel.com>
Thu, 3 Dec 2009 20:48:55 +0000 (20:48 +0000)
committerEmmanuele Bassi <ebassi@linux.intel.com>
Wed, 3 Feb 2010 16:34:27 +0000 (16:34 +0000)
Before asking Cogl and ClutterBackend for the list of features we must
have a GL backend ready.

clutter/clutter-feature.c

index b181c52..1ec6876 100644 (file)
@@ -102,6 +102,9 @@ _clutter_feature_init (void)
 
   context = _clutter_context_get_default ();
 
+  /* makes sure we have a GL context; if we have, this is a no-op */
+  _clutter_backend_create_context (context->backend, NULL);
+
   __features->flags = (_clutter_features_from_cogl (cogl_get_features ())
                     | _clutter_backend_get_features (context->backend));