"renojim" wrote:
Run this on a Roku 1 and it works as expected. On a Roku 2, all I get are blocks of color where the characters should be. However, it gets more interesting. If the REMs are removed on the two lines and either bm or bm2 is returned the string is displayed properly. And, to add to the confusion, if the BuildText function is included inline the text is displayed properly with or without the two bm2 lines.
Thanks for reporting this.
Engineering's Response:A fix has been integrated into the next (4.7) firmware release. The cause of the bug is the roFont gets destroyed when the function is exited and before the DrawText command was committed. The extra Finish() call worked around the bug by committing the DrawText call before the roFont was destroyed. In 4.7, this Finish() call will be unnecessary now that the bug has been fixed.
Further:On Roku2, the 2D API attempts to minimize round-trips to the GPU by queuing up draw calls as much as possible. The draw calls are committed when a state change would alter any draws currently in the queue. For example, changing the alpha setting would force all draw calls to be completed with the current alpha setting.
Unfortunately, another comment that suggested adding a bunch of finish calls would adversely impact performance. A finish call requires a round-trip and the point is to minimize them. .
Hope that helps.
- Joel