Roku Developer Program

Join our online forum to talk to Roku developers and fellow channel creators. Ask questions, share tips with the community, and find helpful resources.
cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
cdoty
Streaming Star

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 2
cdoty
Streaming Star

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
Visitor

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