Can no stand a long story? No? Then I’ll keep it as short as I can.
Take a clue from GLUT and use the PEX font or use the Hershey fonts.
Long ago, back in the 1980s, all the members of the X consortium (except
for SGI) wanted X to support 3D graphics. And, since at that time OpenGL
was NOT open, it was completely closed GL and SGI wanted megabucks for
a license, if they would even license it at all. Since GL was closed
nobody wanted 3D graphics to depend on GL. So, they invented PEX.
Officially PEX does not stand for anything, but really it stands for
PHIGS Extensions to X. And if you look at your XF86Config file you just
might find that you have PEX loaded and ready for use in your X server.
PEX was designed to be a high performance 3D graphics API that worked
well over a network, just like X does for 2D graphics. Well, PEX kinda
sucks and it has no immediate mode so nobody wanted to use it. But,
since your choices were PEX or SGI, PEX started to catch on. SGI stopped
that by creating OpenGL and the rest is history…
But, PEX is all licensed under the X license which lets you do what ever
you want with it. And, PEX contains a nice vector font that can be drawn
using only lines and the characters can be turned into lists that can be
compiled. The result is that you can create a blazingly fast freely
licensed text renderer using the PEX fonts. And that is exactly what
GLUT does. So, grab the PEX font from the X source tree and build a
simple text drawing tool around it. Which is exactly what GLUT did.
The story can get longer. Seems people started writing GL replacement
libraries a long time ago (no, Mesa is not the only one) and one of
those is called VOGLE. It contains code for using the vector Hershey
fonts. The Hershey fonts are another long story, but basically a branch
of the US government created a large collections of fonts and so long as
you don’t use them in the form they were published in, you can use them
how ever you want. VOGLE contains a nearly OpenGL compatible library for
rendering text using the Hershy fonts. These are also vector fonts so
they can be rendered very quickly. VOGLE is in the public domain, which
means you we all own it.
BTW, since these fonts have been around for a very long time, there is a
good chance that REAL HUDs use them.
Bob PendletonOn Fri, 2003-04-18 at 05:57, Codex wrote:
Say, what’s the greatest way or method of rendering Text in OpenGL Screen?,
the fast and low-level way. you know there’s quite a way to render font in
OpenGL, but what’s is the most commonly used by people?
Anyone can suggest me a Font Libarary of using Text in OpenGL in a FAST way,
no fancy crap, just FAST!
- Bob Pendleton: independent writer +
- and programmer. +
- email: Bob at Pendleton.com +