Cogl.Snippet.prototype.set_declarations
function set_declarations(declarations: String): void { // Gjs wrapper for 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.
This function should only be called before the snippet is attached to its first pipeline. After that the snippet should be considered immutable.
Since 1.10
- declarations
The new source string for the declarations section of this snippet.