Skip to content
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

Update textures dinamically without invoking each time TextureRegionFactory.createFromResource(...) #22

Open
GoogleCodeExporter opened this issue May 12, 2015 · 0 comments

Comments

@GoogleCodeExporter
Copy link

What steps will reproduce the problem?
1. Tried the example UpdateTextureExample, adding a TimerHandler which call 
automatically the toggle function to change the textures (without tapping the 
screen)
2. Substitute the textures with file much greater (Example: 768x1024)

What is the expected output? What do you see instead?
The time to toggle from a picture to the other is too long

My solution:

If we in BaseSprite remove the attribute "final" for mTextureRegion, we are 
able to add a method setTextureRegion.
Using this new method in UpdateTextureExample in place of createTiledFromAsset 
we reduce the time for each update.

Regards

Original issue reported on code.google.com by fili...@greenrobot.de on 25 Feb 2011 at 3:32

Attachments:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant