Roku Developer Program

Developers and content creators—a complete solution for growing an audience directly.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
cdoty
Level 8

dfSetBackground?

I'm using dfNewBitmapSet and dfSetBackground to load a background from an xml file. I then pass the returned object, from dfSetBackground, as the region to NewSprite.

It makes sense that the background is huge and gets swapped in and out of video memory as other backgrounds are swapped in. But, is this the most optimized way of drawing a background?
0 Kudos
2 Replies
cdoty
Level 8

Re: dfSetBackground?

Reading a different section of the document, it is recommended to manually draw the background to allow the alpha functionality to be disabled.
0 Kudos
RokuKevin
Level 9

Re: dfSetBackground?

Note also that the dfSetBackground method assumes the backgrounds are files. If you have several scenes in your game, you should consider downloading these backgrounds from the internet to the tmp filesystem before using these methods.

--Kevin
0 Kudos