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>
(cherry picked from commit bf6b509c340bdc3be30e1a81fb96710b3176e9dc)
This commit is contained in:
Neil Roberts 2013-08-25 01:29:15 +01:00
parent 9440c690fb
commit e67e487daf

View File

@ -173,17 +173,17 @@ COGL_BEGIN_DECLS
* <glossterm>attribute vec4 * <glossterm>attribute vec4
* <emphasis>cogl_tex_coord_in</emphasis></glossterm> * <emphasis>cogl_tex_coord_in</emphasis></glossterm>
* <glossdef><para> * <glossdef><para>
* The texture coordinate for the first texture unit. This is * The texture coordinate for layer 0. This is an alternative name
* equivalent to #gl_MultiTexCoord0. * for #cogl_tex_coord0_in.
* </para></glossdef> * </para></glossdef>
* </glossentry> * </glossentry>
* <glossentry> * <glossentry>
* <glossterm>attribute vec4 * <glossterm>attribute vec4
* <emphasis>cogl_tex_coord0_in</emphasis></glossterm> * <emphasis>cogl_tex_coord0_in</emphasis></glossterm>
* <glossdef><para> * <glossdef><para>
* The texture coordinate for the first texture unit. This is * The texture coordinate for the layer 0. This is equivalent to
* equivalent to #gl_MultiTexCoord0. There is also * #gl_MultiTexCoord0. There will also be #cogl_tex_coord1_in and
* #cogl_tex_coord1_in and so on. * so on if more layers are added to the pipeline.
* </para></glossdef> * </para></glossdef>
* </glossentry> * </glossentry>
* <glossentry> * <glossentry>
@ -227,10 +227,13 @@ COGL_BEGIN_DECLS
* </glossentry> * </glossentry>
* <glossentry> * <glossentry>
* <glossterm>varying vec4 * <glossterm>varying vec4
* <emphasis>cogl_tex_coord_out</emphasis>[]</glossterm> * <emphasis>cogl_tex_coord0_out</emphasis></glossterm>
* <glossdef><para> * <glossdef><para>
* An array of calculated texture coordinates for a vertex. This is * The calculated texture coordinate for layer 0 of the pipeline.
* equivalent to #gl_TexCoord. * 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> * </para></glossdef>
* </glossentry> * </glossentry>
* </glosslist> * </glosslist>
@ -246,10 +249,11 @@ COGL_BEGIN_DECLS
* </glossentry> * </glossentry>
* <glossentry> * <glossentry>
* <glossterm>varying vec4 * <glossterm>varying vec4
* <emphasis>cogl_tex_coord_in</emphasis>[]</glossterm> * <emphasis>cogl_tex_coord0_in</emphasis></glossterm>
* <glossdef><para> * <glossdef><para>
* An array of calculated texture coordinates for a vertex. This is * The texture coordinate for layer 0. This is equivalent to
* equivalent to #gl_TexCoord. * #gl_TexCoord[0]. There will also be #cogl_tex_coord1_in and so
* on if more layers are added to the pipeline.
* </para></glossdef> * </para></glossdef>
* </glossentry> * </glossentry>
* <glossentry> * <glossentry>