discard_buffers


Description:

public void discard_buffers (ulong buffers)

Declares that the specified buffers no longer need to be referenced by any further rendering commands.

This can be an important optimization to avoid subsequent frames of rendering depending on the results of a previous frame.

For example; some tile-based rendering GPUs are able to avoid allocating and accessing system memory for the depth and stencil buffer so long as these buffers are not required as input for subsequent frames and that can save a significant amount of memory bandwidth used to save and restore their contents to system memory between frames.

It is currently considered an error to try and explicitly discard the color buffer by passing cogl_buffer_bit_color. This is because the color buffer is already implicitly discard when you finish rendering to a Onscreen framebuffer, and it's not meaningful to try and discard the color buffer of a CoglOffscreen framebuffer since they are single-buffered.

Parameters:

this

A Framebuffer

buffers

A BufferBit mask of which ancillary buffers you want to discard.