[cogl] docs: Fix the documentation for texture coordinates in snippets



commit bf6b509c340bdc3be30e1a81fb96710b3176e9dc
Author: Neil Roberts <neil linux intel com>
Date:   Sun Aug 25 01:29:15 2013 +0100

    docs: Fix the documentation for texture coordinates in snippets
    
    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.
    
    Reviewed-by: Robert Bragg <robert linux intel com>

 cogl/cogl-snippet.h |   26 +++++++++++++++-----------
 1 files 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>


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]