tags:

views:

119

answers:

5

I know I can do it with GLUT. But, I have a big project and I had problem adding GLUT (I am using Delphi) to it.

So, what other options do I have?

+1  A: 

Use FreeType to yield a bitmap given your text.

Edit: It is a mature cross platform library that brings a complete text display capabilities based on fonts including normal Windows TrueType fonts. Here is its definition from Wikipedia:

FreeType is a software library written in C that implements a font rasterization engine. It is used to rasterize characters into bitmaps and provides support for other font-related operations.

mmonem
Can you explain how that works? I mean, is FreeType a procedure or a unit to use?
Flom Enol
@FlomEnol, check the updated answer.
mmonem
A: 

Does this help you? http://wiki.delphigl.com/index.php/wglUseFontBitmaps

Lars
+4  A: 

You can't do it with standard OpenGL functions, unless you basically have textures with text in them, or a list of characters on a texture that you draw from. But don't reinvent the wheel - I would recommend FTGL for rendering text in an OpenGL view. It has several different rendering methods and takes care of things like kerning for you, supports unicode, and has good text metrics features too.

AshleysBrain
Does FTGL have .dll file? Because all I see in their site is header files. I am using Delphi and need to add a .dll file to be able to use it.
Flom Enol
It has both DLL and static linkage available, see the site docs for more info.
AshleysBrain
A: 

If you do decide to implement your own font system be sure to use a texture atlas, I've seen too many OpenGL demos that use one texture per glyph, which leads to atrocious performance (due to the overheads incurred in the OpenGL driver and texture caches).

RobM
+1  A: 

Use TextSuite. http://textsuite.opengl24.de/

someone