-
Notifications
You must be signed in to change notification settings - Fork 820
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Reuse images #956
Comments
The idea is more or less to "hibernate" a texture, which means that it's going to be purged from memory until the moment a display object needs it again (at which time it would be restored from its original source, just like after a context loss). Is that correct? |
We do this in our project. We "hide" the textures (by disposing the base) to free the GPU memory and as long as you don't try to render them, you're OK. When we want to start rendering them again, we "unhide" them. We use the following kludgy code (mTexture is the texture being hidden):
The kicker is that the ConcreteTexture.onContextCreated method is private and we had to make it public for this to work. |
If there is reason to add ability to temporary unload textures from GPU memory and return it back later, to avoid disposing display objects containing Images and make possible its pooling without spending GPU memory?
The text was updated successfully, but these errors were encountered: