cogl: Adds _cogl_swap_buffers_notify for clutter backends

This adds a stop-gap mechanism for Cogl to know when the window system
is requested to present the current backbuffer to the frontbuffer by
adding a _cogl_swap_buffers_notify function that backends are now
expected to call right after issuing the equivalent request to OpenGL
vie the platforms OpenGL binding layer. This (blindly) updates all the
backends to call this new function.

For now Cogl doesn't do anything with the notification but the intention
is to use it as part of a planned read-pixel optimization which will
need to reset some state at the start of each new frame.
This commit is contained in:
Robert Bragg
2011-01-12 22:06:58 +00:00
parent e150f474b3
commit 142b229c5c
10 changed files with 31 additions and 1 deletions

View File

@@ -152,6 +152,7 @@ clutter_stage_osx_get_wrapper (ClutterStageWindow *stage_window);
_clutter_stage_do_paint (CLUTTER_STAGE (self->stage_osx->wrapper), NULL);
cogl_flush ();
[[self openGLContext] flushBuffer];
_cogl_swap_buffers_notify ();
}
/* In order to receive key events */