Texting and speed

Blitz3D Forums/Blitz3D Beginners Area/Texting and speed

Gauge(Posted 2014) [#1]
I am writing a tcp editor, but I don't know which way is fastest to display text. I have to display text in multiple colors on one line so.
My options as I see it

1. text directly to the screen
2. text to an imagebuffer and display the image
3. text to a mesh and rend as a 3d viewport (would be awesomely beneficial)

Any other suggest on potentially speeding up the process if possible? Thanks for the help


RemiD(Posted 2014) [#2]
From my tests, i suggest to use different images (depending on how often a part of the screen will be modified), and rebuild only the images which must be modified, then clear the screen and draw only the images which are on the top layer.
Also you can use a different image for each layer so that only the top layer need to be rebuilt and drawn.

You can use a mesh (a quad) to display the image too. You can copy an image to a texture with copyrect.


Yasha(Posted 2014) [#3]
The Text command is insanely, ludicrously slow. Best avoided if performance is an issue.

The second option will be better but will still incur a large penalty when the system switches between 2D and 3D drawing modes for the rest of the scene. So if possible you should avoid using 2D commands at all.

Using a combination of bitmap fonts and quad meshes is extremely fast, and in fact more or less without equal (and is how it's done in all modern systems). Ol' Draw3D's system should work out of the box.


...on the other hand, is this really a problem? No sense in looking for a solution unless it's actually noticeably slowing down your program (although combining 2D and 3D commands may well be slowing down your program, it really is that slow).


Kryzon(Posted 2014) [#4]
Have a look at FastText:
http://fastlibs.com/libraries.php