Weird problem with fonts...

I am using the regular way to create fonts which I have nearly copied off of the font tutorial from http://www.gametutorials.com. The problem is, if I only create one font, I cannot use it. If I create more than one font, I can use all but the first one I created. When I try to use this first one, it doesn’t show up on the screen. This is really odd. If I create two fonts, the first Arial 32 and the second Times 12, I can use the second, which will be Times 12, so there isn’t some odd switching around effect, so I can rule that out. Anybody have a clue as to what’s going on here?

Oh, forgot to mention, this is on a Windows XP platform running a GeFarce III vid card.

[This message has been edited by 147-2 (edited 11-04-2002).]

I just tried the website and it was down…
Is it using texture maped fonts?

Originally posted by 147-2:
[b]I am using the regular way to create fonts which I have nearly copied off of the font tutorial from http://www.gametutorials.com. The problem is, if I only create one font, I cannot use it. If I create more than one font, I can use all but the first one I created. When I try to use this first one, it doesn’t show up on the screen. This is really odd. If I create two fonts, the first Arial 32 and the second Times 12, I can use the second, which will be Times 12, so there isn’t some odd switching around effect, so I can rule that out. Anybody have a clue as to what’s going on here?

Oh, forgot to mention, this is on a Windows XP platform running a GeFarce III vid card.

[This message has been edited by 147-2 (edited 11-04-2002).][/b]

The only fonts I have ever done are Bitmap fonts. If you copy the fonts to a bitmap quad the problem may be that the texture you use for each font is incorrect. i.e. you load your tecture onto texture 0 and 1 then you use texture 1 when writting the first font. This would mean that you write the wrong font and it only works if you load two fonts.

Hope this helps (but as I say I a new so it is oonly an idea)
Fringe

P.S. Maybe posting somecode would help

why not use glFont instead? it’s easier to use than creating your own font (and faster too – it uses pre-generated bitmap truetype fonts)

search google for glfont to knwo where to get it… .

The link to the tutorial is: http://www.gametutorials.com./Tutorials/opengl/OpenGL_Pg4.htm

From what I can tell, this uses wglUseFontBitmaps. This function creates a true bitmap (as opposed to a pixelmap) for each character. Each bitmap is rendered in its own display list, so its not a problem with the pixel storage mode, textures, etc. Have you tried running the tutorial unmodified first, instead of nearly copying parts of it to your own code? That way you could see if it is your code that is the problem (most likely) or the tutorial or your drivers. Also, if you want to use this method for fonts, read the Win32 API documentation for wglUseFontBitmaps and the OpenGL spec for glGenLists and glCallLists. Tutorials are nice, but they are not a substitute for the original documentation.

[This message has been edited by Aaron (edited 11-05-2002).]