RE: [AD] translucent fonts

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


On Thu, 2006-01-05 at 07:16 -0800, Robert Ohannessian wrote:
> AGL doesn't support truecolor fonts because the assumption was that
> fonts are either monochrome, or 8-bit palettized. If someone can tell me
> how trucolor fonts are supposed to be recognized and dealt with, I can
> add AGL support for those.

They already sort of work.. just colors and transparency come ouf all
wrong. The only difference to 8-bit fonts is that the fg color is always
ignored, and the glpyhs are simply masked_blit.

> 
> Finally, I don't really like vtable changes to support translucency;
> it'll make AGL support that much harder, mainly because AGL *also* needs
> to hack the vtables to make fonts work :/
> 

Ah, true. But with AGL, we can just keep the alpha channel for textured
fonts, and everything already works, no need to change the vtable. Like,
i can do:

agl_font = allegro_gl_convert_font_ex(my_font, AGL_FONT_TEXTURE,
GL_RGBA8)

Now if my_font has 32-bit alpha glyphs, agl_font will use an alpha
texture..

Hm, and I never used the un-converted text output supposedly also
supported by AGL, but not even sure that works right now..

-- 
Elias Pschernig





Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/