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...
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.
I am looking at FreeType next.
kt
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.
Thomas F. Burdick wrote:
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)
right you are.
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.
Knock wood. The win32 build went relatively painlessly, and I am delighted to see ProjectBuilder files for FGLT as well as VC++ dsws.
The only problem is that I still need to toss together a C wrapper since CL cannot talk to C++, and FGLT is C++, with classes and everything. :)
But guess what? I have decided one step at a time, and I am hoping/praying that the easier step is to get X under my belt by settling for built-in GLUT fonts for now.
I'll take a swing at running Cello against Mac OS X Glut just to get some encouragement, then look at building Freeglut on Mac OS X in Unix-mode to get X on Cello's resume (Apple's Glut uses native windows).
kt