bwasty / gltf-viewer

glTF 2.0 Viewer written in Rust
The Unlicense
188 stars 31 forks source link

Updated all dependencies using `cargo upgrade`. #50

Closed anderejd closed 6 years ago

anderejd commented 6 years ago

The big changes are the new gltf crate version and glutin + winit.

The ./tests/load_all_samples.sh has the same output as on master, one of the sample models fail:

...
Saved 800x600 screenshot to target/screenshots/2018-08-16_12-58-05/Monster.png
thread 'main' panicked at 'assertion failed: `(left == right)`
  left: `1`,
 right: `0`: not yet implemented: tex coord set must be 0 (Material::from_gltf)', src/render/material.rs:126:5
note: Run with `RUST_BACKTRACE=1` for a backtrace.
Saved 800x600 screenshot to target/screenshots/2018-08-16_12-58-05/NormalTangentMirrorTest.png
...

EDIT: Tested on Ubuntu 18.04, Radeon R9 290, Mesa 18.1.5, 1920x1080 screen, dpi factor 1.0.

anderejd commented 6 years ago

TODO: on the CursorMoved event, the coordinates should be transformed to physical pixels before forwarding them to orbit_control.

anderejd commented 6 years ago

Issues should be fixed now, should I squash?

I left Node.matrix where it is for now, good enough? :)

bwasty commented 6 years ago

It's fine :)

One small issue I found is that when dragging the window between a High-DPI screen and a normal screen, the viewport within the window becomes too large / to small because no resize is triggered, but only HiDpiFactorChanged. A manual resize fixes it. I'm merging anyway :)

And btw, I just implemented handling for a second texture coordinate set (in a branch), so the NormalTangentMirrorTest should render fine soon.

anderejd commented 6 years ago

Yeah there's something fishy with the resize related code, but it's the same on the old master. On X11 the framebuffer or perspective is not properly updated on resize. I'm going to take a look at that now, just wanted to get everything updated first :)