summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNeil Roberts <neil@linux.intel.com>2013-08-25 01:29:15 +0100
committerNeil Roberts <neil@linux.intel.com>2013-09-02 15:31:19 +0100
commitbf6b509c340bdc3be30e1a81fb96710b3176e9dc (patch)
tree7d652c79668e73c2dcc7f40a117deda4bc0dea9f
parent05630971e0596554582b5d9d137298199860e983 (diff)
downloadcogl-bf6b509c340bdc3be30e1a81fb96710b3176e9dc.tar.gz
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>
-rw-r--r--cogl/cogl-snippet.h26
1 files changed, 15 insertions, 11 deletions
diff --git a/cogl/cogl-snippet.h b/cogl/cogl-snippet.h
index 9e83c548..5eecbfc8 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>