Skip to content
This repository has been archived by the owner on May 27, 2021. It is now read-only.

[LML] AnimatedImage and non-continuous rendering #63

Open
metaphore opened this issue Nov 28, 2017 · 2 comments
Open

[LML] AnimatedImage and non-continuous rendering #63

metaphore opened this issue Nov 28, 2017 · 2 comments

Comments

@metaphore
Copy link
Contributor

metaphore commented Nov 28, 2017

It appears like AnimatedImage is not compatible with non-continuous rendering mode, and should call Gdx.graphics.requestRendering() inside of Actor#act().

I feel like non-continuous rendering case was just dropped during development and never tested. So maybe there is more code that doesn't not support it in the repo.

@czyzby
Copy link
Owner

czyzby commented Dec 17, 2017

Gdx.graphics.requestRendering() will be called after each frame update.

@metaphore
Copy link
Contributor Author

Unfortunately this won't work, since updateFrame() triggers by counter from act(float) and thus requires act(float) to be called continuously every frame.

I'm afraid the easiest way to solve this is to call Gdx.graphics.requestRendering() inside of act(float). There is also another way to update frames - use Timer, but this will involve a bit more changes and also few more checks should be considered due to Timer may trigger callbacks after related actor removed from the stage...

@czyzby czyzby reopened this Dec 18, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants