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

Port the renderer from Glium to WGPU #153

Open
wants to merge 58 commits into
base: master
Choose a base branch
from

Conversation

hovinen
Copy link

@hovinen hovinen commented Jan 29, 2024

Not sure whether you would ever want to merge this, but I thought I'd try porting this renderer to WGPU, just for fun. Consider this PR a "heads up".

All the functionality from the Glium version works as far as I can tell. Figuring out how to map the existing structure to WGPU idioms was a bit challenging. I make no guarantees about whether the code in its current from is still idiomatic :-)

Before upgrading, I got the following error when running rust-doom on Ubuntu 23.10:

```
[INFO  engine::context] Creating system "tick"...                                                                                                                                                                                            │
[INFO  engine::context] Creating system "frame_timers"...                                                                                                                                                                                    │
[INFO  engine::context] Creating system "window"...                                                                                                                                                                                          │
interface 'wl_output' has no event 4                                                                                                                                                                                                         │
thread 'main' panicked at /home/hovinen/.cargo/registry/src/index.crates.io-6f17d22bba15001f/winit-0.21.0/src/platform_impl/linux/wayland/event_loop.rs:395:10:                                                                              │
called `Result::unwrap()` on an `Err` value: Os { code: 2, kind: NotFound, message: "No such file or directory" }                                                                                                                            │
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace                                                                                                                                                                │
```

This attempts to do just the minimum needed to bring winit and glium up to their latest versions. This requires several changes due to API changes in those libraries. Other than that, I am avoiding any rearchitecting or other changes.

After upgrading, the program runs without crashing. One can navigate the levels, but the graphics and animation are a messed up. I don't know the code well enough to be able to fix that problem easily.
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

Successfully merging this pull request may close these issues.

None yet

1 participant