Faster outputs then "Drawtext"?

BlitzMax Forums/BlitzMax Beginners Area/Faster outputs then "Drawtext"?

Hi!

In my recent apps I use the drawtext command quite often, so I was wondering if there is a way to speed it up? (via Bitmapfonts?)

Grisu

Drawtext DOES use a `bitmap font`. It is a texture with glyphs in it, pre-rendered. It should be pretty dam fast.

Maybe you could speed it up a tad using an animimage to hold the letters, and using Indiepath's improved animimage module?

Strangely, as soon as I put 20 Drawtexts + other stuff on screen my framerate drops down significantly. I was hoping someone already wrote a better fontlib module.

Yepp, creating an image at startup with all the letters of a certain font + size in it should help.

*digs into the bmx module folder*

Hmm, having just bought BMX I could do with converting my bitmap font function from B3D.

Should it become a module, or should it just stay as an external source file though?

Module would be nice.

Since I figured out how to use the "framework" command.
I try to reduce the size of my apps whenever possible.
So you don't need to include the module if not needed.

For BP and B3D I used Seth's bitmap font lib + editor.
Was really ace, selecting the font/colours/size/sytle you want and simply create a bmp font from it.

I just threw together a quick bitmap font grabber and renderer because I needed a fairly simple one. I didn't know of the existence of things like Juicyfonts at the time and all I had was a 2 colour bitmap font which needed to be rendered in any colour (cycled through rainbow colours etc).

I might get around to BMX'ing it but I wouldn't do any breath-holding. I'm really trying to concentrate on finishing at least one project before the end of the year. I never finished anything before so I'm damn well going to do it this time >:^)

No stress with this.

I found a workaround:
I draw all texts on the window, but instead of redrawing it every fps I grabimage the window. And draw this image instead while the window is not being updated.

It eats up quite some vidmem, but is MUCH faster....