Fast fonts...

Hi, I’m implementing a drop-down console in my engine at the moment, and it’s almost finished. One problem though: when I display the console, my fps drop from 135 to 38…

This is only when my console is filled with text. I display about 20 lines of 30 characters each, using bitmap fonts (as found in the NeHe tutorial)

thnx

You’re probably better off using a large-ish texture with GL_NEAREST interpolation, and drawing into that using GDI. Only re-draw and re-upload the texture when the text changes.

Using GL_NEAREST it’s not too hard to get pixel-by-pixel matching between the texture and your on-screen “console” quad.

or try the texturefont as found in the NeHe tutorial, too…

combined with display_lists its the fastest thing i know ( wich is usefull )… you have then all the time 16x16 pixel per letter and its drawn very fast… ( nothing on screen but filled with text: 300fps… ( with blending enabled… wich is slower than alphatest, but faked antialiased font… looks much nicer )