From db7f0879531ba397b2091640f7f39d4468544f9a Mon Sep 17 00:00:00 2001 From: Robert Bragg Date: Fri, 15 Jul 2011 12:31:21 +0100 Subject: [PATCH] hello: Make sure to clear background explicitly This test wasn't actually explicitly clearing the background to black it was simply a fluke that some drivers clear the background when allocating a new framebuffer. Reviewed-by: Neil Roberts --- examples/hello.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/examples/hello.c b/examples/hello.c index 079dc4ecf..775cc1aad 100644 --- a/examples/hello.c +++ b/examples/hello.c @@ -2,6 +2,8 @@ #include #include +CoglColor black; + int main (int argc, char **argv) { @@ -38,6 +40,7 @@ main (int argc, char **argv) triangle = cogl_primitive_new_p2c4 (COGL_VERTICES_MODE_TRIANGLES, 3, triangle_vertices); for (;;) { + cogl_clear (&black, COGL_BUFFER_BIT_COLOR); cogl_primitive_draw (triangle); cogl_framebuffer_swap_buffers (fb); }