Hello all,
I’m working with OpenGL ES 1.1 so keep that in mind while reading
I’m trying to get a font to render to a specified color, and it actually works but not for transparency. What I mean is if I want the font to be red, it’s working but red with alpha at 50% juste shows like red with 100% alpha.
Here is a code example, there I’m trying to get a grey tint with 50% alpha but only gets the grey tint with no alpha.
glColor4f(0.8f, 0.8f, 0.8f, 0.5f);
glEnable(GL_BLEND);
glBlendFunc(GL_ONE, GL_ONE_MINUS_SRC_ALPHA);
Since I’m in OpenGL ES 1.1 I can’t change the blend equation. So its blending with the default SrcColorSrcFactor + DstColorDstFactor.
Also I only have these two state enable :
glEnableClientState(GL_VERTEX_ARRAY);
glEnableClientState(GL_TEXTURE_COORD_ARRAY);
So no color array ( does that make all vertex take the glColor* color ???)
Well I think I understand blending but cant figure this out lol
Also my font texture is White or tint of grey where text is and black elsewhere. So basically using glBlendFunc(GL_ONE, GL_ZERO); Makes the text the color specified by glColor* and the rest is perfect black.
Well I would be thankful if anyone could help me with this !
Thanks!
Mick