You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I just added a big water sprite to my game that I draw with a shader that I set on the sprite with the sprite.shader = ... property. But this resulted in the player not being correctly drawn anymore (missing the his body).
After hunting this for a while I realized that when the water.shader property was != NULL the last draw() call just before the water's draw() would be "forgotten", that is, called correctly - but not shown on screen.
After some more digging I added a manual FlxG.batch.flush() in the top of my water.renderShader() override and everything started working.
I guess the batch.flush() call should have been done automatically somewhere..? Can't really tell if it's a libgdx issue or the problem is in flixel-gdx.
The text was updated successfully, but these errors were encountered:
I just added a big water sprite to my game that I draw with a shader that I set on the sprite with the sprite.shader = ... property. But this resulted in the player not being correctly drawn anymore (missing the his body).
After hunting this for a while I realized that when the water.shader property was != NULL the last draw() call just before the water's draw() would be "forgotten", that is, called correctly - but not shown on screen.
After some more digging I added a manual FlxG.batch.flush() in the top of my water.renderShader() override and everything started working.
I guess the batch.flush() call should have been done automatically somewhere..? Can't really tell if it's a libgdx issue or the problem is in flixel-gdx.
The text was updated successfully, but these errors were encountered: