hello guys
i am presently working in an application where i am using multiple fonts to display text . i am using NEHE bitmap font building and printing basecode for my different fonts
the problem is that both the fonts are displaying on the screen alright but after two to three minutes of my applicatiuon run the text disappears but other drawing like trianles lines etc are ok . but the text vanishes . i used the following code
// Our Bitmap Font1
GLvoid BuildFont_1(GLvoid)
{
HFONT font; // Windows Font ID

i am calling the function buildfont_1 whenever i have to print using font1 before glprint function along with glRasterPos()and similarly i call buildfont_2 for font2
can any body help me out

thanks
kashif

mikael_aronsson

05-15-2003, 09:50 PM

Hi !

Do you mean that you call the buildfont functions many times ? if so, then that's the problem, they genererate a number of display list data that you never erase as far as I can tell, so after a little while you will run out of memory.

You need to erase the old display lists first and you should only call the build functions when you have to.

Mikael

Leyder Dylan

05-16-2003, 12:42 PM

Why don't you use 2 differents textures for your font ?

Texture1 and 2 and before drawing your text, just change the texture number ?

Not ?

kashif saeed

05-22-2003, 06:39 AM

hello mikael_aronsson
i read your reply but how can i erase my old display list and use new and then erase that and use previous one please provide me with some help .
how can i make a texture of different fonts
thaks