snippet: Add a hook for the layer texture coordinate transformation

This adds a hook called COGL_SNIPPET_HOOK_TEXTURE_COORD_TRANSFORM.
This can be used to alter the application of the layer user matrix to
a texture coordinate or it can bypass it altogether.

This is the first per-layer hook that affects the vertex shader state
so the patch includes the boilerplate needed to get that to work.

Reviewed-by: Robert Bragg <robert@linux.intel.com>
This commit is contained in:
Neil Roberts
2011-11-28 19:58:15 +00:00
committed by Robert Bragg
parent b7e15929b6
commit 68b3643b25
11 changed files with 268 additions and 12 deletions

View File

@ -131,7 +131,7 @@ _cogl_pipeline_snippet_generate_code (const CoglPipelineSnippetData *data)
")\n"
"{\n");
if (data->return_type)
if (data->return_type && !data->return_variable_is_argument)
g_string_append_printf (data->source_buf,
" %s %s;\n"
"\n",