three-rs / three

[abandoned] Totally not inspired Rust 3D library
Apache License 2.0
555 stars 46 forks source link

MacOS - Example apps don't update projection matrix when window resized #179

Open spacejack opened 6 years ago

spacejack commented 6 years ago

The projection matrix (or viewport?) is not updated when the window is resized as it is when running on Windows/Linux.

kvark commented 6 years ago

Could you please check gl/glutin samples to confirm an upstream issue?

spacejack commented 6 years ago

Interesting results...

Anyway the examples are all very simple, just renders one triangle. When resizing the 'window' example on MacOS the triangle is scaled to fit the window at all times. On Windows10 the triangle remains a fixed size, at a fixed position relative to the bottom/left corner of the window. So it gets cropped if the window shrinks. It also flickers and bounces a bit while resizing.

This is the opposite of what I would have expected, but shows there are differences between platforms.

kbarros commented 6 years ago

I can confirm that on MacOS, resizing three-rs windows generates flicker, unexpected updates to the viewport, and generally bad behavior (e.g., increasingly long lag times). I don't observe this behavior with the examples from the glutin project.

vitvakatu commented 6 years ago

@kbarros what version of glutin did you tested? Also I kindly ask you to test gfx/pre-ll examples (https://github.com/gfx-rs/gfx/tree/pre-ll)

kbarros commented 6 years ago

I apologize, but today I can't reproduce the behavior I reported yesterday with three-rs resizing. Today I only observe the projection matrix / viewport issue that spacejack originally reported. Specifically, when resizing the window in the vertical direction, it appears that the viewport becomes vertically off-center. I confirmed that this resizing issue does not appear in the glutin and gfx/pre-ll examples. I tested only on MacOS.

vitvakatu commented 6 years ago

@kbarros thanks, I'll try to look into it.