Cogl.Renderer.create_dma_buf

### Method

# Cogl Renderercreate_dma_buf

#### Declaration [src]

    CoglDmaBufHandle*
    cogl_renderer_create_dma_buf (
      CoglRenderer* renderer,
      CoglPixelFormat format,
      uint64_t* modifiers,
      int n_modifiers,
      int width,
      int height,
      GError** error
    )

#### Description [src]

Creates a new `CoglFramebuffer` with `width` x `height`, with pixel format `format`, and exports the new framebuffer’s DMA buffer handle.

Passing an empty modifier array (passing a 0 n_modifiers) means implicit modifiers will be used.

This method is not directly available to language bindings.

#### Parameters

`format`

  Type: `CoglPixelFormat`

  A `CoglPixelFormat`.

`modifiers`

  Type: `uint64_t*`

  Array of DRM format modifiers.

  The data is owned by the caller of the method.

`n_modifiers`

  Type: `int`

  Length of modifiers array.

`width`

  Type: `int`

  Width of the new.

`height`

  Type: `int`

  Height of the new.

`error`

  Type: `GError **`

  The return location for a recoverable error.

  The argument can be `NULL`.
  If the return location is not `NULL`, then you must initialize it to a `NULL` `GError*`.
  The argument will be left initialized to `NULL` by the method if there are no errors.
  In case of error, the argument will be set to a newly allocated `GError`; the caller will take ownership of the data, and be responsible for freeing it.

#### Return value

Type: `CoglDmaBufHandle`

A `CoglDmaBufHandle`. The return result must be released with `cogl_dma_buf_handle_free()` after use.

The caller of the method takes ownership of the returned data, and is responsible for freeing it.
The return value can be `NULL`.