title: Issue with glGetTexLevelParameter
body: <p>I'm having an issue trying to get the width and height of a texture using the glGetTexLevelParameter function. No matter what I try, the function will not set the value of the width or height variable. I checked for errors but keep getting no error.  Here is my code (based off of the NeHe tutorials if that helps):</p>
  
  <pre><code>int LoadGLTextures()
  {
  //load image file directly into opengl as new texture
  GLint width = 0;
  GLint height = 0;
  texture[0] = SOIL_load_OGL_texture("NeHe.bmp", SOIL_LOAD_AUTO, SOIL_CREATE_NEW_ID,   SOIL_FLAG_INVERT_Y);       //image must be in same place as lib
  if(texture[0] == 0)
  {
      return false;
  }
  glEnable(GL_TEXTURE_2D);
  glGenTextures(3, &amp;texture[0]);
  
  glBindTexture(GL_TEXTURE_2D, texture[0]);
  glGetTexLevelParameteriv(GL_TEXTURE_2D, 0, GL_TEXTURE_WIDTH, &amp;width);
  glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_NEAREST);  //no filtering bc of GL_NEAREST, looks really bad
  glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_NEAREST);
  
  const GLubyte* test = gluErrorString(glGetError());
  cout &lt;&lt; test &lt;&lt; endl;
  return true;
  }
  </code></pre>
  
  <p>I'm using visual studio 2010 also if that helps. The call to load texture[0] is from the SOIL image library.</p>