I'm trying to render a font and the texture atlas is created as a single channel texture, that is treated as alpha (black is transparent, white is opaque).
I can correctly render the text as a sprite loading the texture with:
glTexImage2D (GL_TEXTURE_2D, 0, GL_ALPHA, width, height, 0, GL_ALPHA, GL_UNSIGNED_BYTE, data);But changing the color as I do with any other sprint is not working, the text is always black (as expected for a colorless opaque pixel, but not desired hahaha)
I can even change the alpha field value of the sprite and it will blend, so the shader is doing its job.
I can find old OpenGl answers to the problem, it involves changing glTexEnvi() values that are no longer supported.
So, how do I do this???