On Sat, 2006-04-01 at 20:08 +0200, Nicolai Haehnle wrote:
> On Friday 31 March 2006 19:49, Keith Packard wrote:
> > On Fri, 2006-03-31 at 09:33 -0700, Brian Paul wrote:
> > 
> > > AFAIK, nobody's hardware does that.
> > > 
> > > When that kind of antialiasing is done for text, I think it's the job 
> > > of the font rendering code to do so.
> > 
> > It's not the construction of the glyphs that's at issue here, I don't
> > think. The glyphs are drawn to the screen using a separate alpha channel
> > for each component in the pixel, an operation which isn't directly
> > supported by the GL API at present. I don't know what we'd need in the
> > hardware for this to be efficient though; I believe it is possible to do
> > it today using three passes for each string, which seems horrendous
> > until you realize how slow it will be to do the same thing with the CPU.
> 
> Surely you could just use an RGB texture instead of an ALPHA texture? Then 
> it's just a matter of setting the appropriate texture environments and 
> blending modes.

Not really, as you can only pass one alpha value to the blending stage.
In the general case you need to do it in multiple passes. I've got code
in glitz for doing this in three passes. For the case when we're using a
solid source color and OVER operator (I think that's 99.9% of all text
rendering in X today) we can actually pass all alpha channels to the
blending stage and achieve per-component alpha blending with the solid
source color in one pass by using GL blend color. I've got code in glitz
for doing this as well.

-David



-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
--
_______________________________________________
Dri-devel mailing list
Dri-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dri-devel

Reply via email to