Text functions faster than Bitmap fonts ?!

Blitz3D Forums/Blitz3D Programming/Text functions faster than Bitmap fonts ?!

mouss38(Posted 2004) [#1]
I have made some tests with "system text function" and bitmaps fonts and

"system text functions" appear to be faster...

?!?!


Warren(Posted 2004) [#2]
Why do you think this would be so ridiculous to find? The text commands are only the kiss of death on certain cards with certain driver revisions.

The text commands SHOULD be faster than bitmap fonts.


Mac M(Posted 2004) [#3]
This is not my case, for example. Displaying 4 o 5 variables on screen for debugging, with simple text, reduces the fps to 75% on my pc.


mouss38(Posted 2004) [#4]
this was my case ! :op


Warren(Posted 2004) [#5]
So ... are the text commands faster for you or not?


mouss38(Posted 2004) [#6]
there was long time ago : no
but today, maybe with the lastest Nvidia drivers : yes


Rambus(Posted 2004) [#7]
Im using 3d text for all my static text but, when it comes to text the updates 60 times a secound I find it faster to just use the text command. (But this still slows the game considerably)
for text like that where updating 3d or using the standard 2d text commands is too slow, what does every one recomend?


Deldy(Posted 2004) [#8]
Well a font is vector, and a bitmap is image.

If the bitmap is loaded, then it would be faster than the text coz it dont have to figure out how the vectors sould be.

But it memory.....


Zethrax(Posted 2004) [#9]
One thing it would be useful to know in regard to the 'Text' command and TrueType fonts, is whether Blitz (or any external tool it's using for this purpose) precalculates the character images derived from the TrueType fonts, or creates them on the fly.

This sort of info really should be in the docs, for speed optimization purposes and general peace of mind on these type of subjects.


big10p(Posted 2004) [#10]
I'm pretty sure blitz simply renders a bitmap from the loaded font, since you have to specify the size of the font when you load it. So, if you want to use the same font but at different sizes, you have to load the same font multiple times - see the doc's LoadFont example.


Rottbott(Posted 2004) [#11]
big10p, that's how I would expect it to work. But if that was so, why would normal text usually be slower than bitmap text?

Also there is a problem with normal Blitz text on certain ATI cards where it is corrupted (it gets a funny line across the top of each character) and is very difficult to read.


big10p(Posted 2004) [#12]

big10p, that's how I would expect it to work. But if that was so, why would normal text usually be slower than bitmap text?



I'm guessing here, but probably because blitz has to do some 'nasty hacking' in order to display the text in any given colour. Blitz doesn't have a bitmap of the text font in every possible colour, after all. Just a guess.


Deldy(Posted 2004) [#13]
DirectX Supports the same text commands as standard that blitz also does, so there is no nasty hacking. Fonts is not converted to bitmaps, I think. I think there are created as vectors, coz else: Why dont we see any big memory increase when we use the fonts? If so: Whould it take all your ram if you make your font really large? Don't really think so :-p

Maybe its the 3dcard, or maybe its software but its not bitmaps.


big10p(Posted 2004) [#14]
If they're kept as vectors, why can you only display the font at the 'loaded' size?


Deldy(Posted 2004) [#15]
Don't ask me :-D
I quess it something about positioning and stuff.


Rob Farley(Posted 2004) [#16]
If you make a bitmap font and use drawblock rather than drawimage you'll find it's quite a bit faster. Obviously this has the drawback of not being transparant.