Cogl.Snippet.set_declarations

### Method

# Cogl Snippetset_declarations

since: 1.10

#### Declaration [src]

    void
    cogl_snippet_set_declarations (
      CoglSnippet* snippet,
      const char* declarations
    )

#### Description [src]

Sets a source string that will be inserted in the global scope of the generated shader when this snippet is used on a pipeline. This string is typically used to declare uniforms, attributes or functions that will be used by the other parts of the snippets.

This function should only be called before the snippet is attached to its first pipeline. After that the snippet should be considered immutable.

Stability: Unstable

Available since: 1.10

#### Parameters

`declarations`

  Type: `const char*`

  The new source string for the declarations section of this snippet.

  The data is owned by the caller of the function.
  The value is a NUL terminated UTF-8 string.