Window doesn't clear if I use Query<&Window> in my draw function #14801
-
|
I'm having a problem where the window isn't clearing properly before each frame. I've set a clear color, and I draw a grid of sprites. When I resize the window, though, the sprite grid smears like in the image below: Here is my code: I've figured out that the problem is the Here is a link to the full code (error is on branch window-bug): https://github.com/jcarvajal288/puzzle-dungeon/tree/window-bug |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
|
Entities are persistent. You spawn new sprites in the |
Beta Was this translation helpful? Give feedback.

Entities are persistent. You spawn new sprites in the
drawsystem, which is in theUpdateschedule, being called every frame. So you create more and more tiles every frame. Moving thedrawfunction into theStartupschedule and having another system updating their position should be the way to go.