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

Resize the surface at the correct time in examples #236

Merged
merged 3 commits into from
Sep 4, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Fix note of why we call resize
  • Loading branch information
madsmtm committed Sep 4, 2024
commit 624ff5ef872cd3ffa4868394fc3869e3ba459df5
3 changes: 2 additions & 1 deletion examples/fruit.rs
Original file line number Diff line number Diff line change
@@ -23,7 +23,8 @@ fn main() {
let mut surface = softbuffer::Surface::new(&context, window.clone()).unwrap();

// Intentionally only set the size of the surface once, at creation.
// This is needed if the window chooses to ignore the size we passed in above.
// This is needed if the window chooses to ignore the size we passed in above, and for the
// platforms softbuffer supports that don't yet extract the size from the window.
surface
.resize(
NonZeroU32::new(width).unwrap(),