+2008-04-03 Emmanuele Bassi <ebassi@openedhand.com>
+
+ * clutter/glx/clutter-backend-glx.c:
+ (clutter_backend_glx_get_features): Assert if we don't have a
+ GL context here or if it's not matched to a drawable. Asserting
+ might seem too drastic, but if we don't have a valid GL context
+ here then Clutter will segfault anyway, and I'll take an assert()
+ over a hard to read, deep in GLX guts backtrace any day (and
+ twice on a monday).
+
+ * clutter/x11/clutter-backend-x11.c:
+ (clutter_backend_x11_get_features): No need for a variable here.
+
2008-04-01 Matthew Allum <mallum@openedhand.com>
* clutter/clutter-backend.c:
const gchar *glx_extensions = NULL;
ClutterFeatureFlags flags = CLUTTER_FEATURE_STAGE_MULTIPLE;
- /* FIXME: we really need to check if gl context is set */
+ /* this will make sure that the GL context exists and its
+ * bound to a drawable
+ */
+ g_assert (backend_glx->gl_context != None);
+ g_assert (glXGetCurrentDrawable () != None);
CLUTTER_NOTE (BACKEND, "Checking features\n"
"GL_VENDOR: %s\n"
ClutterFeatureFlags
clutter_backend_x11_get_features (ClutterBackend *backend)
{
- ClutterFeatureFlags flags = 0;
-
- /* FIXME: we really need to check if gl context is set */
-
- flags = CLUTTER_FEATURE_STAGE_USER_RESIZE|CLUTTER_FEATURE_STAGE_CURSOR;
-
- return flags;
+ return CLUTTER_FEATURE_STAGE_USER_RESIZE | CLUTTER_FEATURE_STAGE_CURSOR;
}
static void