   GLSL won't recognize multitexturing
  Hi,I'm having some trouble implementing bump mapping.  I'll give you some background on what I'm trying to do and what is happening.  An image is being stored in a pointer for the color map I want to use for the object.  I then switch to the second texture unit so I can do this in one pass.  The pointer now has the info for the normal map.  The tex coords are being passed to GLSL with the MultiTex call so when I'm in the vertex shader I assign the gl_TexCoord[0] to MultiTexCoord0 and gl_TexCoord[1] to MultiTexCoord1.  In the frag shader I use the 2D sampler but the second texture just has the values for the first one.  Here's my code relevant to the texturing, please help:GLSLin vert shader:gl_TexCoord[0] = gl_MultiTexCoord0;//color mapgl_TexCoord[1] = gl_MultiTexCoord1;//normal mapin frag shader:vec4 cMap = texture2D(ColorMap, vec2(gl_TexCoord[0]));//cMap is float rgb values of texturevec4 nMap = texture2D(NormalMap, vec2(gl_TexCoord[1]));//nMap is float rgb values of textureC++in main  //texture is GLubyte [256][256][3] and has data by this point   // allocate a texture nameglGenTextures( 2, textureNum );   //global GLuint textureNum[2];glActiveTexture(GL_TEXTURE0);  //activate texture unit 1// select our current textureglBindTexture( GL_TEXTURE_2D, textureNum[0] );glTexEnvi( GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE );// when texture area is small, bilinear filter the closest mipmapglTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER,  GL_LINEAR_MIPMAP_NEAREST );// when texture area is large, bilinear filter the originalglTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR );// the texture wraps over at the edges (repeat)glTexParameterf( GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT );glTexParameterf( GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT );// build our texture mipmapsgluBuild2DMipmaps( GL_TEXTURE_2D, GL_RGB, imagewidth, imageheight,   GL_RGB, GL_UNSIGNED_BYTE, texture );glActiveTexture(GL_TEXTURE1);glBindTexture( GL_TEXTURE_2D, textureNum[1] );glTexEnvi( GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE );// when texture area is small, bilinear filter the closest mipmapglTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER,  GL_LINEAR_MIPMAP_NEAREST );// when texture area is large, bilinear filter the originalglTexParameteri( GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR );// the texture wraps over at the edges (repeat)glTexParameterf( GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_REPEAT );glTexParameterf( GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_REPEAT );HeighttoNormalMap();  //texture  is changed to store the normal map nowgluBuild2DMipmaps( GL_TEXTURE_2D, GL_RGB, imagewidth, imageheight,   GL_RGB, GL_UNSIGNED_BYTE, texture );in display //I have three objects I draw but they all follow this format   glActiveTexture(GL_TEXTURE0);//do I need to call  bindTexture for each texture unit?glEnable( GL_TEXTURE_2D );glActiveTexture(GL_TEXTURE1);glEnable( GL_TEXTURE_2D );glColor3f(1.0f, 1.0f, 1.0f);for(int i = 0; i < FaceList[0]->numFaces; i++){//goes through each faceglBegin(GL_POLYGON);for(int j = 0; j < FaceList->numVerts; j++){//goes through each vertexfloat u = ...; //is defined here but is long and not the problemfloat v = ...; // same hereglMultiTexCoord2f(GL_TEXTURE0, u, v);glMultiTexCoord2f(GL_TEXTURE1, u, v);glVertex3f(//same here);}glEnd();}glActiveTexture(GL_TEXTURE0); glDisable( GL_TEXTURE_2D );glActiveTexture(GL_TEXTURE1);glDisable( GL_TEXTURE_2D );}
  While you still have to bind each texture as before in order to get it to work with GLSL you need to inform OpenGL which texture units you are sampling from.This is done by setting the uniform samplers, in this case ColorMap and NormalMap, to the texture units you are using; so ColorMap would be 0 and NormalMap would be 1. By default these are 0, which is why you sample the same texture both times.   ;  Thanks that worked well.  I wish I would've asked sooner.   