PistonDevelopers / conrod

An easy-to-use, 2D GUI library written entirely in Rust.
Other
3.35k stars 296 forks source link

Consider removing .with_multisampling(4) from glium examples #1338

Open Type1J opened 4 years ago

Type1J commented 4 years ago

I'm trying out Conrod on a Pinebook Pro (Rock64 SoC: ARM64 CPU with Mali GPU). The "Panfrost" open source driver for Mali doesn't seem to support multisampling pixel formats, and so it fails to start:

thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: GlutinCreationError(NoAvailablePixelFormat)', backends/conrod_glium/examples/canvas.rs:26:19

This can easily be fixed by removing the requirement of multisampling (the call to .with_multisampling(4) just above that line in the same file.

I was able to interpret the error message to see what possibly needed to be done, but someone trying out Conrod for the first time may see this as a problem with Conrod and abandon it. I know that multisampling may make it look prettier, but it's not that much prettier, and I don't feel that showing the examples looking their best (when the second best is so much similar) is worth turning off potential users. There could be 2 versions of the same example with 1 using multisampling just to show it off, but labeling it that way gives the expectation that if it doesn't run, then it's the hardware's (or driver's) fault, and not Conrod's.

Type1J commented 4 years ago

An alternative would be to just handle the error, and retry.