blend func problem
Hi,
NeHe Bitmapfonts work fine, but in my current project I''ve got a white background, so the text doesn''t show.
I tried to change the blend func to "the right" but I haven''t found it yet.
Does anyxbody know how to render Black,Bitmapfonts on white background ?
plz help,
thx, stryx
Anything that requires finding convex hulls in realtime isstarting to sound like a bad idea. -- John Carmack
just inverse the colors in NeHe''s bitmap. i think that would work. -PmanC
I tried it, but it doesn''t work, because the color is already white, so the blending doesn''t darken it.
The problem is that i get only lighten-modes.
Blending makes the pictures lighter but not darken ;(
The problem is that i get only lighten-modes.
Blending makes the pictures lighter but not darken ;(
Anything that requires finding convex hulls in realtime isstarting to sound like a bad idea. -- John Carmack
you can do it in 2 ways:
1.
inverse the colors in font bitmap and use GL_EXT_BLEND_MINMAX extension:
glBlendEquationEXT(GL_MIN_EXT);
// here render fonts
glBlendEquationEXT(GL_FUNC_ADD_EXT);
2.
or dont inverse the colors in font bitmap and use GL_EXT_BLEND_SUBTRACT extension:
glBlendEquationEXT(GL_FUNC_REVERSE_SUBTRACT_EXT);
glBlendFunc(GL_ONE,GL_ONE);
// here render fonts
glBlendEquationEXT(GL_FUNC_ADD_EXT);
hope it helps
hali
1.
inverse the colors in font bitmap and use GL_EXT_BLEND_MINMAX extension:
glBlendEquationEXT(GL_MIN_EXT);
// here render fonts
glBlendEquationEXT(GL_FUNC_ADD_EXT);
2.
or dont inverse the colors in font bitmap and use GL_EXT_BLEND_SUBTRACT extension:
glBlendEquationEXT(GL_FUNC_REVERSE_SUBTRACT_EXT);
glBlendFunc(GL_ONE,GL_ONE);
// here render fonts
glBlendEquationEXT(GL_FUNC_ADD_EXT);
hope it helps
hali
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement