This is a very straightforward port too: simply replacing cogl_rectangle() by cogl_framebuffer_draw_rectangle().