Kenny Tilton writes:
Silly me. I had heard that the Big Three (*nix, Mac OS, and win32) all supported native fonts for OpenGL via xgl, agl, and wgl libraries. Well...
(BTW, it's glX for X11)
Bad luck. The one I tried first happened to be wgl, which supports both bitmapped and outline of any installed font on the system. Not so with agl, just bitmap and not just any font. It offers a nice list of pre-defined fonts, but to do this right we need unrestricted font access.
Hrm, I thought that the Mac and X11 supported outline fonts and OpenGL as different, but composable, extensions. I haven't tested this hypothesis, though. Couldn't you use aglGetDrawable on the current context to get the underlying CGrafPtr, then use the normal Carbon text-drawing functions?
I am looking at FreeType next.
Huh, I thought FreeType was an X11 thing (shows what I know). I was going to suggest using xft on X11, to get at font info (eg, that's how you can use all the native fonts with Apple's X11.app). I guess since you can use it everywhere, that might be the simplest thing to do.