Cogl.Framebuffer.discard_buffers

### Method

# Cogl Framebufferdiscard_buffers

#### Declaration [src]

    void
    cogl_framebuffer_discard_buffers (
      CoglFramebuffer* framebuffer,
      unsigned long buffers
    )

#### Description [src]

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 `CoglOnscreen` framebuffer, and it’s not meaningful to try and discard the color buffer of a `CoglOffscreen` framebuffer since they are single-buffered.

#### Parameters

`buffers`

  Type: `unsigned long`

  A `CoglBufferBit` mask of which ancillary buffers you want to discard.