[Fixed with Solution] Error with Binary: thread 'main' panick
ryanjonesrocks opened this issue · 1 comments
ryanjonesrocks commented
I compiled the first tutorial code into a binary and ran cargo run
. The full error I got was
thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: "Couldn\'t find any pixel format that matches the criterias."', libcore/result.rs:945:5 note: Run with `RUST_BACKTRACE=1` for a backtrace.
My guess is that this has to be an incremental build error. I am using the rustc nightly compiler to build this project and tried getting more information from cargo run -v
but still got the same results.
ryanjonesrocks commented
For more information on how this bug was fixed, the function .srgb(false)
was added to the the Window object.
// This function is inside the main method
// Create an Glutin window.
let mut window: Window = WindowSettings::new(
"spinning-square",
[200, 200]
)
.opengl(opengl)
.exit_on_esc(true)
.srgb(false)
.build()
.unwrap();