set_declarations


Description:

public void set_declarations (string 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.

Parameters:

this

A Snippet

declarations

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