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

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

Closed
wants to merge 2 commits into from

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