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:
@ -37,7 +37,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_primitive_draw (triangle);
|
||||
cogl_framebuffer_swap_buffers (fb);
|
||||
|
||||
|
Reference in New Issue
Block a user