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

fix set logical size in JupyterRenderCanvas #50

Merged
merged 1 commit into from
Dec 31, 2024

Conversation

kushalkolar
Copy link
Contributor

The initial logical size for JupyterRenderCanvas is (0, 0) by default which causes sporadic divide by zero errors with WGPU validation and also creates issues for CI since get_frame() returns blank screenshots and then improperly sized screenshots before returning correct screenshots (I'm guessing until it processes events to resize the canvas?). This changes it so that if a size is specified for the canvas in the constructor, then that size is used for the logical_size in addition to the css width and height. Not sure if we should just change the default size in the constructor from (0, 0) as well.

@almarklein
Copy link
Member

Yeah I think this makes sense! Thanks!

@almarklein almarklein merged commit 45843ed into pygfx:main Dec 31, 2024
13 checks passed
@kushalkolar
Copy link
Contributor Author

Thanks! I can also confirm that our tests work again after this change, can we get a bugfix release with this so our CI works again 😄

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.

2 participants