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: 
cclark931
Newbie

Texture Cache: Can you manually offload textures?

The simple question is: Is it possible to manually offload a texture from the texture cache in a SceneGraph app?

I've tested setting the uri to "", removing the Poster, setting it to Invalid, and running RunGarbageCollector(). The texture still shows up when running loaded_textures or r2d2_bitmaps through telnet. I think the texture stays loaded until the cache reaches its size limit, then it will be offloaded..

I have seen older posts about using TextureManager https://developer.roku.com/docs/references/brightscript/interfaces/iftexturemanager.md, but I don't think that can be implemented in a SceneGraph app can it?

The reason I'd like to control this is that a client's channel needs to be able to load map images and animate overlays over those maps (up to 24 fullscreen overlays at 6 frames/second). The issue is that when running the animation, it obviously hits the texture cache limit, which is fine since old frames can be discarded and reloaded. But it also unloads all other UI images too (especially on lower memory devices). If I could manually offload old textures, I could prevent hitting the limit in the first place.

Need Assistance?
Welcome to the Roku Community! Feel free to search our Community for answers or post your question to get help.

Become a Roku Streaming Expert!

Share your expertise, help fellow streamers, and unlock exclusive rewards as part of the Roku Community. Learn more.