title: OpenGL (pyglet) issue with glTexImage2D (striped texture)
body: <p>Trying to use <code>glTexImage2D()</code> to pass a programmatically generated displacement map to a vertex shader, but for some reason the vertices don't seem to be getting uniform values from the uploaded image, even though every value in the array being uploaded is the same.</p>
  
  <p>The python code is as follows:</p>
  
  <pre><code>pix = []
  for x in range(256):
      for y in range(128):
          pix.append(200)  # pix is just [200, 200, 200, ...]
  
  pix = (GLuint * len(pix))(*pix)
  
  disp_tex_id = GLuint(0)
  glGenTextures(1, byref(disp_tex_id))
  
  glActiveTexture(GL_TEXTURE1)
  glEnable(GL_TEXTURE_2D)
  glBindTexture(GL_TEXTURE_2D, disp_tex_id)
  glPixelStorei(GL_UNPACK_ALIGNMENT, 1)
  glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_S, GL_CLAMP)
  glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_WRAP_T, GL_CLAMP)
  glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MAG_FILTER, GL_LINEAR)
  glTexParameteri(GL_TEXTURE_2D, GL_TEXTURE_MIN_FILTER, GL_LINEAR)
  
  glTexImage2D(GL_TEXTURE_2D, 0, GL_LUMINANCE, 256, 128, 0, GL_LUMINANCE, GL_UNSIGNED_BYTE, pix)
  
  shader.uniformi('disp_texture', 1)
  </code></pre>
  
  <p>And the relevant shader code is here:</p>
  
  <pre><code>[vertex]
  #version 110
  #extension GL_EXT_gpu_shader4 : require
  
  uniform sampler2D disp_texture;
  
  varying vec4 dispColor;
  
  void main() {
    gl_TexCoord[0] = gl_MultiTexCoord0;
  
    dispColor = texture2D(disp_texture, gl_TexCoord[0].st);
  }
  
  [fragment]
  #version 110
  varying vec4 dispColor;
  
  void main() {
    gl_FragColor = dispColor;
  }
  </code></pre>
  
  <p>I'm currently just displaying the displacement on the sphere as a color value, but instead of a uniformly gray sphere, it's striped.</p>