SDL_ttf: how to: Positioning text

Hi, total SDL and OpenGL newbie here. I am using the latest of
everything on WinNT, via the Common Lisp CL-SDL project. Nehe tutorials
up to 5 run great. I have added picking from Nehe-32 successfully, now I
want to add text via SDL_ttf and FreeType.

I have it all installed and am able to open a font and get font and
glyph info, but now it is time to draw text. No sign of it yet. The
picking logic (selecting actually) tells me the glyph is there
somewhere, so that’s a start.

Question: How does one position text in SDL_ttf? glRasterPos?
glTranslatef? Other?

Mind you I find myself wondering if it is not a color issue, since the
selection logic says the glyph is there somewhere. ie, maybe I am
messing up the color info so the character is clear. Anyway, any
ideas/info welcome. Meanwhile I’ll be fussing with the NeHe tutorials to
see if i can at least make win32 fonts and imaging work.–

kenny tilton
clinisys, inc

"“Well, I’ve wrestled with reality for thirty-five years, Doctor,
and I’m happy to state I finally won out over it.”"
Elwood P. Dowd

Well, one of the RenderGlyph methods in SDL_ttf is broken. I think its the
TTF_RenderGlyph_Solid(). For me, it either gives me a memory error or draws
nothing. I think that bug is fixed in the current version in the CVS
repository.

You might want to check out the “glfont” demo that comes with the SDL_ttf.
It shows how to position font and display the text in OpenGL.>I have it all installed and am able to open a font and get font and glyph

info, but now it is time to draw text. No sign of it yet. The picking logic
(selecting actually) tells me the glyph is there somewhere, so that’s a
start.

Question: How does one position text in SDL_ttf? glRasterPos? glTranslatef?
Other?

Mind you I find myself wondering if it is not a color issue, since the
selection logic says the glyph is there somewhere. ie, maybe I am messing
up the color info so the character is clear. Anyway, any ideas/info
welcome. Meanwhile I’ll be fussing with the NeHe tutorials to see if i can
at least make win32 fonts and imaging work.


MSN 8 with e-mail virus protection service: 2 months FREE*
http://join.msn.com/?page=features/virus