mirror of
https://github.com/brl/mutter.git
synced 2024-12-26 21:02:14 +00:00
956d39ac30
This adds hook points to add global function and variable declarations to either the fragment or vertex shader. The declarations can then be used by subsequent snippets. Only the ‘declarations’ string of the snippet is used and the code is directly put in the global scope near the top of the shader. The reason this is necessary rather than just adding a normal snippet with the declarations is that for the other hooks Cogl assumes that the snippets are independent of each other. That means if a snippet has a replace string then it will assume that it doesn't even need to generate the code for earlier hooks which means the global declarations would be lost. Reviewed-by: Robert Bragg <robert@linux.intel.com> (cherry picked from commit ebb82d5b0bc30487b7101dc66b769160b40f92ca) |
||
---|---|---|
.. | ||
gl | ||
nop |