   multitexture with vertex colors as the blending factor
  hi all,I am new here, and trying to do multi-texture, but with requirements of the blending factor. For example, I have a square (0,0), (0,1), (1,1) and (1,0). I am going to map multiple textures on to this square, say 3 textures. But the final result should depend on the vertex color of the four vertices. For example, color of (0,0) is (0.4, 0.6, 0.8, x); //(x does not matter for 3 textures)color of (0,1) is (0.8, 0.2, 0.7, x);color of (1,1) is (0.1, 0.3, 0.9, x);color of (1,0) is (0.5, 0.5, 0.5, x);for vertex (0,0), the color result should be C1 * 0.4 + C2 * 0.6 + C3 * 0.8;for vertex (0,1), the color result should be C1 * 0.8 + C2 * 0.2 + C3 * 0.7;for vertex (1,1), the color result should be C1 * 0.1 + C2 * 0.3 + C3 * 0.9;for vertex (1,0), the color result should be C1 * 0.5 + C2 * 0.5 + C3 * 0.5;where C1 is the color from texture 1, C2 is the color from texture 2, C3 is the color from texture 3, respectively.I wonder if I can use opengl to realize this by glTexEnv() functions? Do I have to use GLSL to achieve this?Here is the rendering functions for vertex arrays which is required also, because it could be many vertices to draw one object.glEnableClientState(GL_VERTEX_ARRAY);glEnableClientState(GL_TEXTURE_COORD_ARRAY);glDrawElements ( prim, indexCount, GL_UNSIGNED_INT, indexArray );   
  I don't think is possible with the fixed function pipeline, but it's easily made using a GLSL fragment shader.   