Skip to content

fix set logical size in JupyterRenderCanvas#50

Merged
almarklein merged 1 commit intopygfx:mainfrom
kushalkolar:main
Dec 31, 2024
Merged

fix set logical size in JupyterRenderCanvas#50
almarklein merged 1 commit intopygfx:mainfrom
kushalkolar:main

Conversation

@kushalkolar
Copy link
Copy Markdown
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
Copy Markdown
Member

Yeah I think this makes sense! Thanks!

@almarklein almarklein merged commit 45843ed into pygfx:main Dec 31, 2024
@kushalkolar
Copy link
Copy Markdown
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