From 0294fc27ed6e27683fef4b5494c368a9843309ea Mon Sep 17 00:00:00 2001 From: Emmanuele Bassi Date: Wed, 10 Jun 2015 15:15:20 +0100 Subject: [PATCH] examples: Do not use deprecated Cogl API Examples should be as idiomatic as possible. --- examples/cogl-crate.c | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/examples/cogl-crate.c b/examples/cogl-crate.c index 0836b823a..d04e30857 100644 --- a/examples/cogl-crate.c +++ b/examples/cogl-crate.c @@ -121,12 +121,12 @@ paint (Data *data) /* And finally render our Pango layouts... */ - cogl_pango_render_layout (data->hello_label, - (data->framebuffer_width / 2) - - (data->hello_label_width / 2), - (data->framebuffer_height / 2) - - (data->hello_label_height / 2), - &white, 0); + cogl_pango_show_layout (fb, data->hello_label, + (data->framebuffer_width / 2) - + (data->hello_label_width / 2), + (data->framebuffer_height / 2) - + (data->hello_label_height / 2), + &white); } static void @@ -265,8 +265,6 @@ main (int argc, char **argv) data.hello_label_width = PANGO_PIXELS (hello_label_size.width); data.hello_label_height = PANGO_PIXELS (hello_label_size.height); - cogl_push_framebuffer (fb); - data.swap_ready = TRUE; cogl_onscreen_add_frame_callback (COGL_ONSCREEN (fb),