diff options
author | Neil Roberts <neil@linux.intel.com> | 2010-07-12 17:01:32 +0100 |
---|---|---|
committer | Neil Roberts <neil@linux.intel.com> | 2010-07-13 14:29:07 +0100 |
commit | ec718d4ca47923edfb9687b3929a824a8c7005ac (patch) | |
tree | 3256573555a874856d5b90e568a2b4308a282452 /cogl/winsys/cogl-texture-pixmap-x11.c | |
parent | 5288f6d88d94988875d69d8a850053f66319d042 (diff) | |
download | cogl-ec718d4ca47923edfb9687b3929a824a8c7005ac.tar.gz |
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.
Diffstat (limited to 'cogl/winsys/cogl-texture-pixmap-x11.c')
-rw-r--r-- | cogl/winsys/cogl-texture-pixmap-x11.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/cogl/winsys/cogl-texture-pixmap-x11.c b/cogl/winsys/cogl-texture-pixmap-x11.c index 4af893c7..70a42a95 100644 --- a/cogl/winsys/cogl-texture-pixmap-x11.c +++ b/cogl/winsys/cogl-texture-pixmap-x11.c @@ -1286,7 +1286,7 @@ static void _cogl_texture_pixmap_x11_set_wrap_mode_parameters (CoglTexture *tex, GLenum wrap_mode_s, GLenum wrap_mode_t, - GLenum wrap_mode_r) + GLenum wrap_mode_p) { CoglTexturePixmapX11 *tex_pixmap = COGL_TEXTURE_PIXMAP_X11 (tex); CoglHandle child_tex; @@ -1297,7 +1297,7 @@ _cogl_texture_pixmap_x11_set_wrap_mode_parameters (CoglTexture *tex, _cogl_texture_set_wrap_mode_parameters (child_tex, wrap_mode_s, wrap_mode_t, - wrap_mode_r); + wrap_mode_p); } static CoglPixelFormat |