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

FlxSprite.isSimpleRender has huge side effects and causes a batch flushes #79

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

kamstrup
Copy link

FlxSprite.isSimpleRender has huge side effects and causes a batch flush on EVERY call.

Make the function simple and readable, and defer render state
handling to where we already have it, in FlxSprite.draw().

Tested on my own games that uses rotating sprites and 1 shader.
Blending and other fancyness not tested, but I think it will work.

Fixes #78

flush on EVERY call.

Make the function simple and readable, and defer render state
handling to where we already have it, in FlxSprite.draw().

Tested on my own games that uses rotating sprites and 1 shader.
Blending and other fancyness not tested, but I think it will work.

Fixes flixel-gdx#78
@WingEraser
Copy link
Member

Your fix doesn't work. Try to run GLES20 example 1-3.

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

Successfully merging this pull request may close these issues.

FlxSprite.isSimpleRender() is nasty, causing implicit batch flushes!
2 participants