diff options
author | Neil Roberts <neil@linux.intel.com> | 2011-11-28 19:58:15 +0000 |
---|---|---|
committer | Robert Bragg <robert@linux.intel.com> | 2011-12-06 19:02:06 +0000 |
commit | 68b3643b2543c0f5f787f95663c8e9195e291227 (patch) | |
tree | 916a8dc31d0a195d68d1fcbddec3acdfe241fde9 /cogl/cogl-pipeline-layer-private.h | |
parent | b7e15929b66ab5a0f6935a5cdcc82c616dbc2d77 (diff) |
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>
Diffstat (limited to 'cogl/cogl-pipeline-layer-private.h')
-rw-r--r-- | cogl/cogl-pipeline-layer-private.h | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/cogl/cogl-pipeline-layer-private.h b/cogl/cogl-pipeline-layer-private.h index e4285993..0bd70348 100644 --- a/cogl/cogl-pipeline-layer-private.h +++ b/cogl/cogl-pipeline-layer-private.h @@ -79,6 +79,7 @@ typedef enum COGL_PIPELINE_LAYER_STATE_COMBINE_CONSTANT_INDEX, COGL_PIPELINE_LAYER_STATE_USER_MATRIX_INDEX, COGL_PIPELINE_LAYER_STATE_POINT_SPRITE_COORDS_INDEX, + COGL_PIPELINE_LAYER_STATE_VERTEX_SNIPPETS_INDEX, COGL_PIPELINE_LAYER_STATE_FRAGMENT_SNIPPETS_INDEX, /* note: layers don't currently have any non-sparse state */ @@ -117,6 +118,8 @@ typedef enum COGL_PIPELINE_LAYER_STATE_POINT_SPRITE_COORDS = 1L<<COGL_PIPELINE_LAYER_STATE_POINT_SPRITE_COORDS_INDEX, + COGL_PIPELINE_LAYER_STATE_VERTEX_SNIPPETS = + 1L<<COGL_PIPELINE_LAYER_STATE_VERTEX_SNIPPETS_INDEX, COGL_PIPELINE_LAYER_STATE_FRAGMENT_SNIPPETS = 1L<<COGL_PIPELINE_LAYER_STATE_FRAGMENT_SNIPPETS_INDEX, @@ -139,15 +142,18 @@ typedef enum COGL_PIPELINE_LAYER_STATE_COMBINE_CONSTANT | \ COGL_PIPELINE_LAYER_STATE_USER_MATRIX | \ COGL_PIPELINE_LAYER_STATE_POINT_SPRITE_COORDS | \ + COGL_PIPELINE_LAYER_STATE_VERTEX_SNIPPETS | \ COGL_PIPELINE_LAYER_STATE_FRAGMENT_SNIPPETS) #define COGL_PIPELINE_LAYER_STATE_MULTI_PROPERTY \ (COGL_PIPELINE_LAYER_STATE_FILTERS | \ COGL_PIPELINE_LAYER_STATE_WRAP_MODES | \ COGL_PIPELINE_LAYER_STATE_COMBINE | \ + COGL_PIPELINE_LAYER_STATE_VERTEX_SNIPPETS | \ COGL_PIPELINE_LAYER_STATE_FRAGMENT_SNIPPETS) -#define COGL_PIPELINE_LAYER_STATE_AFFECTS_VERTEX_CODEGEN 0 +#define COGL_PIPELINE_LAYER_STATE_AFFECTS_VERTEX_CODEGEN \ + COGL_PIPELINE_LAYER_STATE_VERTEX_SNIPPETS typedef enum { @@ -200,6 +206,7 @@ typedef struct gboolean point_sprite_coords; + CoglPipelineSnippetList vertex_snippets; CoglPipelineSnippetList fragment_snippets; } CoglPipelineLayerBigState; |