Skip to content

Sprites created with Draw.is_visible=false are never visible#1008

Closed
msvbg wants to merge 2 commits intobevyengine:masterfrom
msvbg:fix-draw-invisible
Closed

Sprites created with Draw.is_visible=false are never visible#1008
msvbg wants to merge 2 commits intobevyengine:masterfrom
msvbg:fix-draw-invisible

Conversation

@msvbg
Copy link
Contributor

@msvbg msvbg commented Dec 5, 2020

When sprites are created with draw.is_visible = false, the bind group containing Transform and Sprite_size never gets created. I tried to find a proper solution to the problem, but the renderer code is too complicated for me to fully understand at this point. This solution may be a bit of a cop-out, so I'm okay with it not getting merged. A better solution would perhaps be to make sure that all the necessary bind groups are created when the sprite gets created. This PR does however remove the bug, as far as I can tell.

@Moxinilian Moxinilian added C-Bug An unexpected or incorrect behavior A-Rendering Drawing game state to the screen labels Dec 6, 2020
@cart
Copy link
Member

cart commented Dec 9, 2020

Yeah this definitely works, but it comes at the cost of updating buffers every frame (which is expensive). I just put out a pr that lets us retain incremental binding updates.

@msvbg
Copy link
Contributor Author

msvbg commented Dec 9, 2020

Thank you!

@msvbg msvbg closed this Dec 9, 2020
@msvbg msvbg deleted the fix-draw-invisible branch December 9, 2020 22:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-Rendering Drawing game state to the screen C-Bug An unexpected or incorrect behavior

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants