   Multitexturing in GLSL problem
  Hi!I've been trying to implement multitexturing through GLSL. I've googled and searched around like a nut and then came to the conclusion that I need to use these methods below to send multiple textures to GLSL:glActiveTextureARB(GL_TEXTURE0_ARB);glEnable(GL_TEXTURE_2D);glBindTexture(GL_TEXTURE_2D, diffusemap);glUniform1i(glGetUniformLocation(programObj, "diffmap"), 0);glActiveTextureARB(GL_TEXTURE1_ARB);glEnable(GL_TEXTURE_2D);glBindTexture(GL_TEXTURE_2D, heightmap);glUniform1i(glGetUniformLocation(programObj, "heightmap"), 1);However, this doesn't work for me. My shader only takes one texture.Have I missed something? Something that I'm not sure about is where I actually should put this piece of code..  Where should glUniform1i() be placed? I've seen examples that places the function between where the actual shader is used, but that doesn't work for me.Any help is appreciated. Thanks   
  What do you mean your "shader only takes one texture"? You need to make your shader have as many samplers as you want to sample. Do you mean its return -1 for the location? Post your shader also.You'll want to do the setup something like this:Initialize(){//build the program ...//this persistantly binds diffmap to the texture that is bound to TEXTURE0, and heightmap to TEXTURE1glUniform1i(glGetUniformLocation(programObj, "diffmap"), 0);glUniform1i(glGetUniformLocation(programObj, "heightmap"), 1);}Render(){glActiveTexture(GL_TEXTURE0)glBindTexture(GL_TEXTURE_2D,diffusemap);glActiveTexture(GL_TEXTURE1)glBindTexture(GL_TEXTURE_2D,heightmap);...glDrawElements()//clearing the active textures (optional)glActiveTexture(GL_TEXTURE0)glBindTexture(GL_TEXTURE_2D,0);glActiveTexture(GL_TEXTURE1)glBindTexture(GL_TEXTURE_2D,0);}Also you should know that glEnable(GL_TEXTURE_2D) doesn't do anything when you're using shaders, so you don't need it.   