Advertisement

Font == slow

Started by November 18, 2000 03:51 PM
6 comments, last by Dunge 24 years ago
I have a game who run at 70 FPS without any font, I created 4 text with glPrint() from lesson13 and it slow down the game to 30fps.... what''s wrong? I tryed to change ANTIALIASED_QUALITY to any quality it don''t change nothing! Please help me...
when do you print your text? dont switch to often your matrix-stacks, just for info

we wanna play, not watch the pictures

If that's not the help you're after then you're going to have to explain the problem better than what you have. - joanusdmentia

My Page davepermen.net | My Music on Bandcamp and on Soundcloud

Advertisement
I use this code...

  glLoadIdentity();glTranslatef(0.0f,0.0f,-1.0f);glRasterPos2f(-0.50f, 0.37f);glPrint("Press F1 for help");glRasterPos2f( 0.30f, 0.37f);glPrint("FPS : %3.0f", newfps);glRasterPos2f(-0.50f, -0.40f);glPrint("Player 1 score: %2.0f", p1score);glRasterPos2f( 0.05f, -0.40f);glPrint("Player 2 score: %2.0f", p2score);  


but I need to change the Raster to select where I write the font!
Bitmap fonts are really slow. You should use textured quads to draw your text.
That would entail loading at least 4 (for his example) more textures at the beginning which might eat away at ram people don''t have... Hence, making it even slower.

S.
Textured quads can''t change text, are ugly and move on the top of the other surfaces....
Advertisement
go on, the NeHe Tutorials describe how to print Texture-Text out. It''s not static, in no way. And you even can draw it onto 3d-models when you want (funny, but i dont know if its useful)

and, this one 256x256 texture dont take so much ram. Hey, thats just bout 265k ram, when u use it with 32bit color mode (u dont have to, btw). Normal grafic-cards have, at min, 4mb, and combined with pc-ram (normaly 32 or 64mb), you have enougth for your font.

And, its really much FASTER. dont use RasterPos, its the slowest thing on earth, really

we wanna play, not watch the pictures

If that's not the help you're after then you're going to have to explain the problem better than what you have. - joanusdmentia

My Page davepermen.net | My Music on Bandcamp and on Soundcloud

i back up daveperman saiz, its the quickest way by far all games use it eg quake unreal etc

http://members.xoom.com/myBollux

This topic is closed to new replies.

Advertisement