LiangliangNan / Easy3D

A lightweight, easy-to-use, and efficient C++ library for processing and rendering 3D data
GNU General Public License v3.0
1.37k stars 245 forks source link

[BUG] - dpi_scaling distorts multi viewports #168

Closed CharlesJQuarra closed 1 year ago

CharlesJQuarra commented 1 year ago

Describe the bug Tutorial_205_Multiview looks distorted after zooming toward the spheres (See screenshot)

I debugged the easy3d/viewer/multi_viewer.cpp and inside the constructor the view_width is 400. However after update_division(), the viewports are rendered with effective width of 450. I realised that dpi_scaling() is returning 1.125 and that this factor seems to be the culprit, after I override this to 1.0 the distortion seems resolved

Development/Running environment:

Screenshot from 2023-07-22 19-45-38

LiangliangNan commented 1 year ago

Hi, thanks for reporting this issue. “dpi_scaling() is returning 1.125” but the actual value is 1.0 – this is quite weird and suspicious. Can you debug and go inside this function and see what width and height values are for the framebuffer? (I cannot reproduce this issue, and it is apparently not correct to simply override the dpi factor to 1).

LiangliangNan commented 1 year ago

I've tested it on Linux Ubuntu 22, and everything seems working fine. I am going to close this issue. Please feel free to reopen it when you can reproduce the issue.