hecrj / coffee

An opinionated 2D game engine for Rust
https://docs.rs/coffee
MIT License
1.08k stars 55 forks source link

Error: WindowCreation("Couldn\'t find any pixel format that matches the criteria.") #124

Closed luisvgs closed 4 years ago

luisvgs commented 4 years ago

Hello, I'm trying to use coffee for learning purposes but I'm unfortunately not able to run the example provided by the documentation. The compiler complains with the following error:

Error: WindowCreation("Couldn\'t find any pixel format that matches the criteria.")
error: process didn't exit successfully:
`C:\Users\_\Desktop\Programming\Rust_Projects\target\debug\coffe_sketch.exe` (exit code: 1)      

This is how my Cargo.toml file looks like:

[package]
name = "coffe_sketch"
version = "0.1.0"
authors = ["_"]
edition = "2018"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
coffee = { version = "0.4", features = ["opengl"] }

Further details:

OS: Windows 10 x64
rustc 1.43.0-nightly (58b834344 2020-02-05)  

How can I solve this issue? Any help and guidance would be truly appreciated. Thanks in advance.

hecrj commented 4 years ago

Do any of the other graphics backends work for you?

luisvgs commented 4 years ago

Do any of the other graphics backends work for you?

@hecrj hi! I tried with Vulkan and dx11, but I'm not able to compile with any of both features.

When I use either of both, the error is the following:

thread 'main' panicked at 'assertion failed: image::Usage::COLOR_ATTACHMENT.contains(config.image_usage)', C:\Users\Luis\.cargo\registry\src\github.com-1ecc6299db9ec823\gfx-backend-dx11-0.5.0\src\lib.rs:819:9
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
error: process didn't exit successfully: `C:\Users\Luis\Desktop\Programming\Rust_Projects\target\debug\coffe_sketch.exe` (exit code: 101)  

I'm confused. I have no clue of what can possible be causing this behavior.

hecrj commented 4 years ago

Oh, that is probably related to #125.

luisvgs commented 4 years ago

@hecrj I was able to compile the examples and solve the problem by switching to vulkan backend after deleting COPY_DST. 👍