OpenGL Text Renderer

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!–
“We all know Linux is great…it does infinite loops in 5 seconds.”
(Linus Torvalds about the superiority of Linux on the Amterdam
Linux Symposium)

Theres an explanation in the red book of a good method:
http://fly.cc.fer.hr/~unreal/theredbook/chapter04.html
go to the Executing Multiple Display Lists section. I have used this method with textured quads in my list instead of the line strip method used in the book, simple and works very well.On Fri, 18 Apr 2003 17:57:29 +0700 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!


“We all know Linux is great…it does infinite loops in 5 seconds.”
(Linus Torvalds about the superiority of Linux on the Amterdam
Linux Symposium)


SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl

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 +
    ±----------------------------------+

i just have a texture w/ 1 16x16 grid of characters. I have a function
which works like printf and just goes character by character drawing quads
onto the screen texture mapped with the right peice of the texture. Works
good for me, i can send you the font texture i use if youd like, i got it
from a tutorial somewhere that i cant find anymore.> ----- Original Message -----

From: bob@pendleton.com (Bob Pendleton)
To: “SDL Mailing List”
Sent: Monday, April 21, 2003 3:19 PM
Subject: Re: [SDL] OpenGL Text Renderer

On 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!

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 Pendleton


±----------------------------------+

  • Bob Pendleton: independent writer +
  • and programmer. +
  • email: Bob at Pendleton.com +
    ±----------------------------------+

SDL mailing list
SDL at libsdl.org
http://www.libsdl.org/mailman/listinfo/sdl