title: OpenGL loading multiple textures - not working
body: <p>I have successfully loaded a single texture using the gltLoadTGA function that I have. Now that I am trying to load multiple textures it's not working. This is the texturing part of my setup function:</p>
  
  <pre><code>glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR);
  glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR);
  glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP_TO_EDGE);
  glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP_TO_EDGE);
  
  glGenTextures(numTextures, textures);
  
  // Load the first texture
  glBindTexture(GL_TEXTURE_2D, textures[SHAPE_TEX]);
  glPixelStorei(GL_UNPACK_ALIGNMENT, 1);
  pBytes = gltLoadTGA("TexasFlag.tga", &amp;iWidth, &amp;iHeight, &amp;iComponents, &amp;eFormat);
  glTexImage2D(GL_TEXTURE_2D, 0, iComponents, iWidth, iHeight, 0, eFormat, GL_UNSIGNED_BYTE, pBytes);
  free(pBytes);
  
  // Load the "A"
  glBindTexture(GL_TEXTURE_2D, textures[A_TEX]);
  glPixelStorei(GL_UNPACK_ALIGNMENT, 1);
  pBytesA = gltLoadTGA("letter a.tga", &amp;iWidth, &amp;iHeight, &amp;iComponents, &amp;eFormat);
  glTexImage2D(GL_TEXTURE_2D, 0, iComponents, iWidth, iHeight, 0, eFormat, GL_UNSIGNED_BYTE, pBytesA);
  free(pBytesA);
  
  // Load the "B"
  glBindTexture(GL_TEXTURE_2D, textures[B_TEX]);
  glPixelStorei(GL_UNPACK_ALIGNMENT, 1);
  pBytesB = gltLoadTGA("letter b.tga", &amp;iWidth, &amp;iHeight, &amp;iComponents, &amp;eFormat);
  glTexImage2D(GL_TEXTURE_2D, 0, iComponents, iWidth, iHeight, 0, eFormat, GL_UNSIGNED_BYTE, pBytesB);
  free(pBytesB);
  
  // Load the "C"
  glBindTexture(GL_TEXTURE_2D, textures[C_TEX]);
  glPixelStorei(GL_UNPACK_ALIGNMENT, 1);
  pBytesC = gltLoadTGA("letter c.tga", &amp;iWidth, &amp;iHeight, &amp;iComponents, &amp;eFormat);
  glTexImage2D(GL_TEXTURE_2D, 0, iComponents, iWidth, iHeight, 0, eFormat, GL_UNSIGNED_BYTE, pBytesC);
  free(pBytesC);
  
  glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_DECAL);
  glEnable(GL_TEXTURE_2D);
  </code></pre>
  
  <p>And my draw function is basically:
      glBindTexture(GL_TEXTURE_2D, SHAPE_TEX); 
      // draw a lot...</p>
  
  <p>But no texture is showing up at all. Whats wrong?</p>
  
  <p>**By the way this has to be in C only, not C++</p>