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

surface_configured in docs #585

Open
ivnsch opened this issue Dec 22, 2024 · 3 comments
Open

surface_configured in docs #585

ivnsch opened this issue Dec 22, 2024 · 3 comments

Comments

@ivnsch
Copy link

ivnsch commented Dec 22, 2024

The code uses this variable, but it's not declared

https://sotrh.github.io/learn-wgpu/beginner/tutorial2-surface/#render

Screenshot 2024-12-22 at 08 05 57
@Rayytra
Copy link

Rayytra commented Jan 14, 2025

Add this to the fn run() function:

let mut surface_configured = false; 

It didn't appear in the website though.
It was supposed to appear after

let mut state = State::new(&window).await;

@ivnsch
Copy link
Author

ivnsch commented Jan 14, 2025

Yeap of course I added it to my code, just suggesting a minor improvement to the docs.

@tom-dudley
Copy link

Just a note for anyone else stumbling across this like myself, that variable needs to be set, which I believe should be here:

state.resize(*physical_size); // this line should already exist
surface_configured = true;

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

No branches or pull requests

3 participants