Cogl.Snippet.new
function new(hook: Cogl.SnippetHook, declarations: String, post: String): Cogl.Snippet { // Gjs wrapper for cogl_snippet_new() }
Allocates and initializes a new snippet with the given source strings.
Since 1.10
- hook
The point in the pipeline that this snippet will wrap around or replace.
- declarations
The source code for the declarations for this snippet or null. See Cogl.Snippet.prototype.set_declarations.
- post
The source code to run after the hook point where this shader snippet is attached or null. See Cogl.Snippet.prototype.set_post.
- Returns
a pointer to a new Cogl.Snippet