Alpha channel - was Re: [SDL] Truetype vs bitmapped fonts? Opinions?

Joe Knapka jknapka at
Tue Apr 11 19:12:30 PDT 2000

vining at wrote:
> Here's the real best way to go, IMO, and an example of how I feel C++ and classes should be used. More on this sort of ranting
> later, as if you haven't heard enough!
> Create a CFont object. When it initializes, have it choose a font, and a point size. This font's constructor then renders letters using
> SDL_ttf (or whatever) for each letter in the font that you'll actually end up using (for easy use, always store your font
> characters internally in some sort of useful format, like ASCII characters). Store 'em with alpha values, like Bill suggests, the
> smart fellow that he is. Then, your code for rendering would be called something like:
> myFont->printf(0,0,"Mord wuz here\n");
> which just goes through and blasts down the bitmaps. Then, if you need another font, allocate another CFont object. Best of both
> worlds.

This is just what the SDL_bmf library does
(for bitmapped characters, not ttf), except the
part about alpha values. Can someone explain 
(maybe in a private email) what is the purpose
of alpha channels, or point me at relevant
documentation? I gather it has to do with
transparency, but I'm really fuzzy beyond that.


-- Joe
> Nichol

-- Joe Knapka

More information about the SDL mailing list