Rename the third texure coordinate from 'r' to 'p'
authorNeil Roberts <neil@linux.intel.com>
Mon, 12 Jul 2010 16:01:32 +0000 (17:01 +0100)
committerNeil Roberts <neil@linux.intel.com>
Tue, 13 Jul 2010 13:29:07 +0000 (14:29 +0100)
commit192cfa7a58bf00cab41ee91b6791e3682dfe4053
tree33a56ed93306c0a09684cbb9ad6af078919417de
parentcefc0e381bfebfdf766b8331e82da474e848013b
Rename the third texure coordinate from 'r' to 'p'

Using 'r' to name the third component is problematic because that is
commonly used to represent the red component of a vector representing
a color. Under GLSL this is awkward because the texture swizzling for
a vector uses a single letter for each component and the names for
colors, textures and positions are synonymous. GLSL works around this
by naming the components of the texture s, t, p and q. Cogl already
effectively already exposes this naming because it exposes GLSL so it
makes sense to use that naming consistently. Another alternative could
be u, v and w. This is what Blender and Direct3D use. However the w
component conflicts with the w component of a position vertex.
13 files changed:
clutter/cogl/cogl/cogl-atlas-texture.c
clutter/cogl/cogl/cogl-material-private.h
clutter/cogl/cogl/cogl-material.c
clutter/cogl/cogl/cogl-sub-texture.c
clutter/cogl/cogl/cogl-texture-2d-sliced.c
clutter/cogl/cogl/cogl-texture-2d.c
clutter/cogl/cogl/cogl-texture-3d-private.h
clutter/cogl/cogl/cogl-texture-3d.c
clutter/cogl/cogl/cogl-texture-private.h
clutter/cogl/cogl/cogl-texture-rectangle.c
clutter/cogl/cogl/cogl-texture.c
clutter/cogl/cogl/cogl-vertex-buffer.c
clutter/cogl/cogl/winsys/cogl-texture-pixmap-x11.c