Cogl.Onscreen.prototype.swap_buffers
function swap_buffers(): void { // Gjs wrapper for cogl_onscreen_swap_buffers() }
Swaps the current back buffer being rendered too, to the front for display.
This function also implicitly discards the contents of the color, depth and stencil buffers as if Cogl.Framebuffer.prototype.discard_buffers were used. The significance of the discard is that you should not expect to be able to start a new frame that incrementally builds on the contents of the previous frame.
<note>It is highly recommended that applications use Cogl.Onscreen.prototype.swap_buffers_with_damage instead whenever possible and also use the Cogl.Onscreen.prototype.get_buffer_age api so they can perform incremental updates to older buffers instead of having to render a full buffer for every frame.</note>
Since 1.10