[Cogl] [PATCH 3/3] Add support for per-vertex point sizes
Neil Roberts
neil at linux.intel.com
Wed Jul 4 08:24:32 PDT 2012
Actually, one small change that would be good to squash into that patch
would be the following to make it run the vertex transform hook before
running the point size calculation hook. That would make it easier to
make the point size depend on the z position from the vertex transform.
diff --git a/cogl/cogl-pipeline-vertend-glsl.c b/cogl/cogl-pipeline-vertend-glsl.c
index 8ca8853..aec893f 100644
--- a/cogl/cogl-pipeline-vertend-glsl.c
+++ b/cogl/cogl-pipeline-vertend-glsl.c
@@ -403,6 +403,9 @@ _cogl_pipeline_vertend_glsl_end (CoglPipeline *pipeline,
"cogl_position_in;\n"
"}\n");
+ g_string_append (shader_state->source,
+ " cogl_vertex_transform ();\n");
+
if (has_per_vertex_point_size)
{
g_string_append (shader_state->header,
@@ -416,7 +419,6 @@ _cogl_pipeline_vertend_glsl_end (CoglPipeline *pipeline,
}
g_string_append (shader_state->source,
- " cogl_vertex_transform ();\n"
" cogl_color_out = cogl_color_in;\n"
"}\n");
More information about the Cogl
mailing list