Fastest way to render large amount of text?

Monkey Forums/Monkey Programming/Fastest way to render large amount of text?

CopperCircle(Posted 2013) [#1]
Hi, I am looking at rendering a full screen/screens of text and found it hammers performance due to the amount of images being rendered. Looking for a way to improve performance, thought about maybe pre-rendering to an image and then drawing just one image? Any other ideas? thanks.


muddy_shoes(Posted 2013) [#2]
Rendering static text to a buffer/image is pretty much the way to go unless you're willing to investigate platform specific rendering paths. What platform(s) are you talking about anyway?

I posted this example of buffered vs unbuffered text rendering a while back: http://www.stickydesigns.com/monkey/offscreen/MonkeyGame.html. It doesn't use standard Monkey, but I assume something similar could be achieved with the ReadPixel stuff.


CopperCircle(Posted 2013) [#3]
Thanks, that's a nice speed boost, it needs to support iOS and Andriod. Do you have a code example?


muddy_shoes(Posted 2013) [#4]
Not of my underlying code, no. It's a fairly extensive re-purposing of mojo. There are plenty of examples of using ReadPixels around the forum though.

As I understand it ReadPixels requires you to draw to the screen and then copy from that. My code allows you to create completely separate render buffers and draw on them directly. The difference is mainly convenience (played off against the inconvenience of maintaining the code).