GNOME Bugzilla – Bug 703327
Add a "glFinish" API
Last modified: 2013-06-29 21:58:52 UTC
There seem to be no API in cogl that allows users to call glFinish but there are cases where it is needed: https://bugzilla.gnome.org/show_bug.cgi?id=701801#c18 The only way to do it currently is to call raw gl which is suboptimal. There is _cogl_winsys_wait_for_gpu (CoglOnscreen *onscreen) in winsys-glx but it is privat. So I decided to just add a cogl_onscreen_wait_for_gpu (see patch).
Created attachment 248063 [details] [review] onscreen: Add cogl_onscreen_wait_for_gpu API Block until all submitted rendering is complete. In most cases there should be no need to call this unless subsequent code needs requires that the drawing is proccessed by the GPU, like when reuseing buffers using the buffer_age API.
Not needed atleast not for bug 701801
Just to note for future reference, if anyone did want some API to call glFinish, there is already cogl_framebuffer_finish which should do the trick.