Constructor

CoglSnippetnew

Declaration [src]

CoglSnippet*
cogl_snippet_new (
  CoglSnippetHook hook,
  const char* declarations,
  const char* post
)

Description [src]

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

Parameters

hook

Type: CoglSnippetHook

The point in the pipeline that this snippet will wrap around or replace.

declarations

Type: const char*

The source code for the declarations for this snippet or NULL. See cogl_snippet_set_declarations().

The argument can be NULL.
The data is owned by the caller of the function.
The value is a NUL terminated UTF-8 string.
post

Type: const char*

The source code to run after the hook point where this shader snippet is attached or NULL. See cogl_snippet_set_post().

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

Return value

Type: CoglSnippet

A pointer to a new CoglSnippet.

The caller of the function takes ownership of the data, and is responsible for freeing it.