title: OpenGL - Textures - Replacing black (white) with color
body: <p>I am generating a bitmap for a text display with OpenGL using Cairo/Pango. I generate the bitmap as RGBA with a transparent background and with the text in either black or white. (Let's assume black.)</p>
  
  <p>If I load this bitmap as an OpenGL texture and display it, it appears as black text or white text, as expected.</p>
  
  <p>I'd like to be able to color the text using only the original texture, but with OpenGL taking care of the coloring.</p>
  
  <p>Preferably, I'd like to use glColor to set the color, but I'm willing to use glBlendColor or GL_TEXTURE_ENV_COLOR.</p>
  
  <p>However, I can't get any of those options to work.</p>
  
  <p>I've try what seem like innumerable combinations of
   - white text or black text
   - enabling blending or using GL_TEXTURE_ENV_MODE's GL_BLEND
   - trying GL_MODULATE, GL_REPLACE, and GL_COMBINE
   - trying various differnt glBlendFunc combinations</p>
  
  <p>I've been searching online and reading the spec for a few hours and I'm really at the end of my rope.</p>
  
  <p>Can anyone point me to the right place to get the answer to this?</p>