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 | ||
gles | ||
cogl-attribute-gl-private.h | ||
cogl-attribute-gl.c | ||
cogl-buffer-gl-private.h | ||
cogl-buffer-gl.c | ||
cogl-clip-stack-gl-private.h | ||
cogl-clip-stack-gl.c | ||
cogl-framebuffer-gl-private.h | ||
cogl-framebuffer-gl.c | ||
cogl-pipeline-fragend-fixed-private.h | ||
cogl-pipeline-fragend-fixed.c | ||
cogl-pipeline-fragend-glsl-private.h | ||
cogl-pipeline-fragend-glsl.c | ||
cogl-pipeline-opengl-private.h | ||
cogl-pipeline-opengl.c | ||
cogl-pipeline-progend-fixed-private.h | ||
cogl-pipeline-progend-fixed.c | ||
cogl-pipeline-progend-glsl-private.h | ||
cogl-pipeline-progend-glsl.c | ||
cogl-pipeline-vertend-fixed-private.h | ||
cogl-pipeline-vertend-fixed.c | ||
cogl-pipeline-vertend-glsl-private.h | ||
cogl-pipeline-vertend-glsl.c | ||
cogl-texture-2d-gl-private.h | ||
cogl-texture-2d-gl.c | ||
cogl-texture-gl-private.h | ||
cogl-texture-gl.c | ||
cogl-util-gl-private.h | ||
cogl-util-gl.c |