diff --git a/examples/cogl-crate.c b/examples/cogl-crate.c index 3c9ee43ad..edd9f31d4 100644 --- a/examples/cogl-crate.c +++ b/examples/cogl-crate.c @@ -165,16 +165,8 @@ main (int argc, char **argv) return 1; } - data.framebuffer_width = 640; - data.framebuffer_height = 480; - onscreen = cogl_onscreen_new (ctx, data.framebuffer_width, data.framebuffer_height); - /* Eventually there will be an implicit allocate on first use so this - * will become optional... */ + onscreen = cogl_onscreen_new (ctx, 640, 480); fb = COGL_FRAMEBUFFER (onscreen); - if (!cogl_framebuffer_allocate (fb, &error)) { - fprintf (stderr, "Failed to allocate framebuffer: %s\n", error->message); - return 1; - } data.framebuffer_width = cogl_framebuffer_get_width (fb); data.framebuffer_height = cogl_framebuffer_get_height (fb); diff --git a/examples/cogl-hello.c b/examples/cogl-hello.c index e8e4f5b4f..ad3850977 100644 --- a/examples/cogl-hello.c +++ b/examples/cogl-hello.c @@ -25,16 +25,9 @@ main (int argc, char **argv) } onscreen = cogl_onscreen_new (ctx, 640, 480); - /* Eventually there will be an implicit allocate on first use so this - * will become optional... */ - fb = COGL_FRAMEBUFFER (onscreen); - if (!cogl_framebuffer_allocate (fb, &error)) { - fprintf (stderr, "Failed to allocate framebuffer: %s\n", error->message); - return 1; - } - cogl_onscreen_show (onscreen); + fb = COGL_FRAMEBUFFER (onscreen); cogl_push_framebuffer (fb); triangle = cogl_primitive_new_p2c4 (COGL_VERTICES_MODE_TRIANGLES, diff --git a/examples/cogl-msaa.c b/examples/cogl-msaa.c index aecc90363..3c1594ced 100644 --- a/examples/cogl-msaa.c +++ b/examples/cogl-msaa.c @@ -43,8 +43,6 @@ main (int argc, char **argv) } onscreen = cogl_onscreen_new (ctx, 640, 480); - /* Eventually there will be an implicit allocate on first use so this - * will become optional... */ fb = COGL_FRAMEBUFFER (onscreen); cogl_framebuffer_set_samples_per_pixel (fb, 4); diff --git a/examples/cogl-sdl-hello.c b/examples/cogl-sdl-hello.c index b74e8a2a5..c8f6702bc 100644 --- a/examples/cogl-sdl-hello.c +++ b/examples/cogl-sdl-hello.c @@ -138,15 +138,6 @@ main (int argc, char **argv) SDL_InitSubSystem (SDL_INIT_TIMER); onscreen = cogl_onscreen_new (ctx, 800, 600); - /* Eventually there will be an implicit allocate on first use so this - * will become optional... */ - data.fb = COGL_FRAMEBUFFER (onscreen); - if (!cogl_framebuffer_allocate (data.fb, &error)) - { - fprintf (stderr, "Failed to allocate framebuffer: %s\n", - error->message); - return 1; - } cogl_color_set_from_4ub (&data.black, 0, 0, 0, 255); data.center_x = 0.0f; diff --git a/examples/cogl-x11-foreign.c b/examples/cogl-x11-foreign.c index b1d6acf3a..cba837f9c 100644 --- a/examples/cogl-x11-foreign.c +++ b/examples/cogl-x11-foreign.c @@ -146,17 +146,9 @@ main (int argc, char **argv) update_cogl_x11_event_mask, xdpy); - fb = COGL_FRAMEBUFFER (onscreen); - /* Eventually there will be an implicit allocate on first use so this - * will become optional... */ - if (!cogl_framebuffer_allocate (fb, &error)) - { - fprintf (stderr, "Failed to allocate framebuffer: %s\n", error->message); - return 1; - } - XMapWindow (xdpy, xwin); + fb = COGL_FRAMEBUFFER (onscreen); cogl_push_framebuffer (fb); triangle = cogl_primitive_new_p2c4 (COGL_VERTICES_MODE_TRIANGLES, diff --git a/examples/cogl-x11-tfp.c b/examples/cogl-x11-tfp.c index b04511838..551ce8184 100644 --- a/examples/cogl-x11-tfp.c +++ b/examples/cogl-x11-tfp.c @@ -167,15 +167,6 @@ main (int argc, char **argv) update_cogl_x11_event_mask, xdpy); - fb = COGL_FRAMEBUFFER (onscreen); - /* Eventually there will be an implicit allocate on first use so this - * will become optional... */ - if (!cogl_framebuffer_allocate (fb, &error)) - { - fprintf (stderr, "Failed to allocate framebuffer: %s\n", error->message); - return 1; - } - XMapWindow (xdpy, xwin); XCompositeRedirectSubwindows (xdpy, xwin, CompositeRedirectManual); @@ -190,11 +181,11 @@ main (int argc, char **argv) gc = XCreateGC (xdpy, tfp_xwin, 0, NULL); - pixmap = XCompositeNameWindowPixmap (xdpy, tfp_xwin); tfp = cogl_texture_pixmap_x11_new (pixmap, TRUE); + fb = COGL_FRAMEBUFFER (onscreen); cogl_push_framebuffer (fb); for (;;)