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:
@ -13,8 +13,6 @@
|
||||
ButtonReleaseMask | \
|
||||
PointerMotionMask)
|
||||
|
||||
CoglColor black;
|
||||
|
||||
static void
|
||||
update_cogl_x11_event_mask (CoglOnscreen *onscreen,
|
||||
guint32 event_mask,
|
||||
@ -171,7 +169,7 @@ main (int argc, char **argv)
|
||||
}
|
||||
cogl_xlib_renderer_handle_event (renderer, &event);
|
||||
}
|
||||
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