summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Bragg <robert@linux.intel.com>2011-07-01 01:41:31 +0100
committerRobert Bragg <robert@linux.intel.com>2011-07-11 14:07:02 +0100
commit09e7174b1dd2d46f8e94b6eecdff947e12716d59 (patch)
tree7ffbb230d85939ba07a2d7e42673afa8c9b86ebe
parent38b67e2884f44a7647dbcd9a72b79d9147d180c1 (diff)
downloadcogl-09e7174b1dd2d46f8e94b6eecdff947e12716d59.tar.gz
Remove cogl_context_set_default API
For cogl 2.0 we don't want to have a default context. In the meantime we can simply assume that calling cogl_context_new() implicitly sets that context as the default context before returning. Signed-off-by: Neil Roberts <neil@linux.intel.com>
-rw-r--r--cogl/cogl-context.c10
-rw-r--r--cogl/cogl-context.h4
-rw-r--r--examples/x11-foreign.c3
3 files changed, 0 insertions, 17 deletions
diff --git a/cogl/cogl-context.c b/cogl/cogl-context.c
index 0981e0d6..35b9c858 100644
--- a/cogl/cogl-context.c
+++ b/cogl/cogl-context.c
@@ -498,16 +498,6 @@ _cogl_context_get_default (void)
return _context;
}
-void
-cogl_set_default_context (CoglContext *context)
-{
- cogl_object_ref (context);
-
- if (_context)
- cogl_object_unref (_context);
- _context = context;
-}
-
#ifdef COGL_HAS_EGL_SUPPORT
EGLDisplay
cogl_context_egl_get_egl_display (CoglContext *context)
diff --git a/cogl/cogl-context.h b/cogl/cogl-context.h
index 654a88c2..57fc9f68 100644
--- a/cogl/cogl-context.h
+++ b/cogl/cogl-context.h
@@ -61,10 +61,6 @@ CoglContext *
cogl_context_new (CoglDisplay *display,
GError **error);
-#define cogl_set_default_context cogl_set_default_context_EXP
-void
-cogl_set_default_context (CoglContext *context);
-
#ifdef COGL_HAS_EGL_SUPPORT
#define cogl_context_egl_get_egl_display cogl_context_egl_get_egl_display_EXP
EGLDisplay
diff --git a/examples/x11-foreign.c b/examples/x11-foreign.c
index e43a2ef5..c101adae 100644
--- a/examples/x11-foreign.c
+++ b/examples/x11-foreign.c
@@ -104,9 +104,6 @@ main (int argc, char **argv)
fprintf (stderr, "Failed to create context: %s\n", error->message);
return 1;
}
- /* Eventually we want to get rid of any "default context" but for now it's
- * needed... */
- cogl_set_default_context (ctx);
onscreen = cogl_onscreen_new (ctx, 640, 480);