title: Changing Alpha Value of OpenGL ES Object - GL_BLEND - iPhone
body: <p>I have a textured object in my OpenGL ES scene (version 1.1) for which I want to change the alpha to 0.5.</p>
  
  <p>I am trying the following code :</p>
  
  <pre><code>glEnableClientState(GL_VERTEX_ARRAY);
  glEnableClientState(GL_NORMAL_ARRAY);
  glEnableClientState(GL_TEXTURE_COORD_ARRAY);
  
  glTexEnvi(GL_TEXTURE_ENV, GL_TEXTURE_ENV_MODE, GL_MODULATE);
  glEnable(GL_BLEND); 
  glBlendFunc(GL_ONE, GL_ONE_MINUS_SRC_ALPHA);
  glColor4f(1.0, 1.0, 1.0, 0.5);
  
  glVertexPointer(3, GL_FLOAT, 0, vertexes);
  glNormalPointer(GL_FLOAT, 0, normals);
  glTexCoordPointer(2, GL_FLOAT, 0, textures);
  
  GLfloat ambientAndDiffuse[] = kAmbience;
  glMaterialfv(GL_FRONT_AND_BACK, GL_AMBIENT_AND_DIFFUSE, ambientAndDiffuse);
  GLfloat specular[] = kSpecular;
  glMaterialfv(GL_FRONT_AND_BACK, GL_SPECULAR, specular);
  glMaterialf(GL_FRONT_AND_BACK, GL_SHININESS, kShininess);
  GLfloat emission[] = kEmission;
  glMaterialfv(GL_FRONT_AND_BACK, GL_EMISSION, emission);
  
  glDrawElements(GL_TRIANGLES, vertexCount, GL_UNSIGNED_SHORT, indices);
  
  glDisableClientState(GL_VERTEX_ARRAY);
  glDisableClientState(GL_NORMAL_ARRAY);
  glDisableClientState(GL_TEXTURE_COORD_ARRAY);
  glDisable(GL_BLEND);
  </code></pre>
  
  <p>The problem is that the transparency of the model is not changing. The model is displayed on the screen correctly, however the alpha is still 1.</p>
  
  <p>EDIT</p>
  
  <p>My textures are jpgs. Do I need to save these as PNGs ?</p>
  
  <p>Can anyone spot how I can correct this ?</p>
  
  <p>Thank you.</p>