examples: use cogl_framebuffer_clear4f not cogl_clear

cogl_clear depends on the default CoglContext which we are trying to
steer the API away from requiring. cogl_framebuffer_clear4f is
explicitly passed a framebuffer pointer which is implicitly related to a
specific context.

This updates all the examples to use cogl_framebuffer_clear4f instead of
cogl_clear and removes any redundant CoglColor that was previously
passed to cogl_clear.

Reviewed-by: Neil Roberts <neil@linux.intel.com>
This commit is contained in:
Robert Bragg
2012-01-07 23:28:36 +00:00
parent cdbc1dc9b1
commit 7287dd1faf
7 changed files with 12 additions and 24 deletions

View File

@ -2,8 +2,6 @@
#include <glib.h>
#include <stdio.h>
CoglColor black;
int
main (int argc, char **argv)
{
@ -90,7 +88,7 @@ main (int argc, char **argv)
int n_poll_fds;
gint64 timeout;
cogl_clear (&black, COGL_BUFFER_BIT_COLOR);
cogl_framebuffer_clear4f (fb, COGL_BUFFER_BIT_COLOR, 0, 0, 0, 1);
cogl_push_matrix ();
cogl_scale (0.5, 1, 1);