sotrh/learn-wgpu

compiler error

discipulus262 opened this issue · 4 comments

The compiler generates an error because: use of moved value: window. It says that there is a problem with the ownership

use the state to access the window inside the closuer

...
     if window_id == state.window.id() => match event {
...

That worked, but now that I am running it again, env_logger is generating this:

[2023-07-21T20:10:33Z ERROR wgpu::backend::direct] Error in Adapter::request_device: Limit 'max_texture_dimension_2d' value 8192 is better than allowed 4096
thread 'main' panicked at 'called Result::unwrap() on an Err value: RequestDeviceError', /home/kiko/rust/opengl_tut1/src/lib.rs:56:17
note: run with RUST_BACKTRACE=1 environment variable to display a backtrace

sotrh commented

The error is saying that your try to set the max_texture_dimension_2d to 8192, but your graphics card only allows a max size of 4096.

Thanks! (that makes sense, because I am running on a raspberry pi)
I'm going to close the issue.