Cogl.Snippet
Description: Reference for Cogl.Snippet

### Class

# CoglSnippet

#### Description

    final class Cogl.Snippet : GObject.TypeInstance {
      /* No available fields */
    }

No description available.

#### Ancestors

- CoglObject

#### Constructors

###### cogl_snippet_new

Allocates and initializes a new snippet with the given source strings.

Available since: 1.10

#### Instance methods

###### cogl_snippet_get_declarations

No description available.

Available since: 1.10

###### cogl_snippet_get_hook

No description available.

Available since: 1.10

###### cogl_snippet_get_post

No description available.

Available since: 1.10

###### cogl_snippet_get_pre

No description available.

Available since: 1.10

###### cogl_snippet_get_replace

No description available.

Available since: 1.10

###### cogl_snippet_set_declarations

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.

Available since: 1.10

###### cogl_snippet_set_post

Sets a source string that will be inserted after the hook point in the generated shader for the pipeline that this snippet is attached to. Please see the documentation of each hook point in `CoglPipeline` for a description of how this string should be used.

Available since: 1.10

###### cogl_snippet_set_pre

Sets a source string that will be inserted before the hook point in the generated shader for the pipeline that this snippet is attached to. Please see the documentation of each hook point in `CoglPipeline` for a description of how this string should be used.

Available since: 1.10

###### cogl_snippet_set_replace

Sets a source string that will be used instead of any generated source code or any previous snippets for this hook point. Please see the documentation of each hook point in `CoglPipeline` for a description of how this string should be used.

Available since: 1.10

##### Methods inherited from CoglObject (2)

###### cogl_object_get_user_data

Finds the user data previously associated with `object` using the given `key`. If no user data has been associated with `object` for the given `key` this function returns NULL.

Available since: 1.4

###### cogl_object_set_user_data

Associates some private `user_data` with a given `CoglObject`. To later remove the association call `cogl_object_set_user_data()` with the same `key` but NULL for the `user_data`.

Available since: 1.4