[Cogl] [PATCH 1/4] docs: Fix the documentation for texture coordinates in snippets

Robert Bragg robert at sixbynine.org
Mon Sep 2 06:28:50 PDT 2013


This looks good to land to me:

Reviewed-by: Robert Bragg <robert at linux.intel.com>

thanks,
Robert


On Sun, Aug 25, 2013 at 2:42 AM, Neil Roberts <neil at linux.intel.com> wrote:
> The documentation for the builtin varyings for the texture coordinates
> was wrongly claiming that the varyings are stored in an array. This
> was changed in e55b64a9cdc9 so that each layer gets its own
> independent varying.
>
> The documentation was also referring to texture units instead of layer
> numbers. The texture units are no longer publicly exposed in the
> shaders and instead everything should in theory be expressed in terms
> of layer numbers.
> ---
>  cogl/cogl-snippet.h | 26 +++++++++++++++-----------
>  1 file changed, 15 insertions(+), 11 deletions(-)
>
> diff --git a/cogl/cogl-snippet.h b/cogl/cogl-snippet.h
> index 9e83c54..5eecbfc 100644
> --- a/cogl/cogl-snippet.h
> +++ b/cogl/cogl-snippet.h
> @@ -165,17 +165,17 @@ COGL_BEGIN_DECLS
>   *   <glossterm>attribute vec4
>   *         <emphasis>cogl_tex_coord_in</emphasis></glossterm>
>   *   <glossdef><para>
> - *    The texture coordinate for the first texture unit. This is
> - *    equivalent to #gl_MultiTexCoord0.
> + *    The texture coordinate for layer 0. This is an alternative name
> + *    for #cogl_tex_coord0_in.
>   *   </para></glossdef>
>   *  </glossentry>
>   *  <glossentry>
>   *   <glossterm>attribute vec4
>   *         <emphasis>cogl_tex_coord0_in</emphasis></glossterm>
>   *   <glossdef><para>
> - *    The texture coordinate for the first texture unit. This is
> - *    equivalent to #gl_MultiTexCoord0. There is also
> - *    #cogl_tex_coord1_in and so on.
> + *    The texture coordinate for the layer 0. This is equivalent to
> + *    #gl_MultiTexCoord0. There will also be #cogl_tex_coord1_in and
> + *    so on if more layers are added to the pipeline.
>   *   </para></glossdef>
>   *  </glossentry>
>   *  <glossentry>
> @@ -219,10 +219,13 @@ COGL_BEGIN_DECLS
>   *  </glossentry>
>   *  <glossentry>
>   *   <glossterm>varying vec4
> - *         <emphasis>cogl_tex_coord_out</emphasis>[]</glossterm>
> + *         <emphasis>cogl_tex_coord0_out</emphasis></glossterm>
>   *   <glossdef><para>
> - *    An array of calculated texture coordinates for a vertex. This is
> - *    equivalent to #gl_TexCoord.
> + *    The calculated texture coordinate for layer 0 of the pipeline.
> + *    This is equivalent to #gl_TexCoord[0]. There will also be
> + *    #cogl_tex_coord1_out and so on if more layers are added to the
> + *    pipeline. In the fragment shader, this varying is called
> + *    #cogl_tex_coord0_in.
>   *   </para></glossdef>
>   *  </glossentry>
>   * </glosslist>
> @@ -238,10 +241,11 @@ COGL_BEGIN_DECLS
>   *  </glossentry>
>   *  <glossentry>
>   *   <glossterm>varying vec4
> - *              <emphasis>cogl_tex_coord_in</emphasis>[]</glossterm>
> + *              <emphasis>cogl_tex_coord0_in</emphasis></glossterm>
>   *   <glossdef><para>
> - *    An array of calculated texture coordinates for a vertex. This is
> - *    equivalent to #gl_TexCoord.
> + *    The texture coordinate for layer 0. This is equivalent to
> + *    #gl_TexCoord[0]. There will also be #cogl_tex_coord1_in and so
> + *    on if more layers are added to the pipeline.
>   *   </para></glossdef>
>   *  </glossentry>
>   *  <glossentry>
> --
> 1.8.3.1
>
> _______________________________________________
> Cogl mailing list
> Cogl at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/cogl


More information about the Cogl mailing list