I have no comparison but I think using the rectangles is fast enough. I made a test with 1000 x "Hello crazy World" with random colours, positions, alphablends and textsizes. The result is (on my machine here): 176 ms.
fonttest.jpg
I have no comparison but I think using the rectangles is fast enough. I made a test with 1000 x "Hello crazy World" with random colours, positions, alphablends and textsizes. The result is (on my machine here): 176 ms.
fonttest.jpg
Best regards,
Cybermonkey
Nevermind, the thread tree is confusing me ...
Last edited by Solstice Project; 01-11-2013 at 12:32 AM.
You could use that array to generate a bitmap font, and draw it as quads same way you would use other fonts. If i understood you are drawing each unique pixel per frame, and is something i'd not recommend for performance reasons.
My suggestion was to use the data you have to pre-render a bitmap during application startup (i.e. it only ever lives in memory) and then do exactly as User137 is suggesting... simply draw your letters as quads and stick the relevant section of your pre-rendered bitmap to it as the texture.
That's how I'd go about doing it. Clean, relatively efficient and simple.
:: AthenaOfDelphi :: My Blog :: My Software ::
Bookmarks