Skip to content
Snippets Groups Projects
Commit e44b5487 authored by Merov Linden's avatar Merov Linden
Browse files

STORM-281 : Fix Map FOV frustum when UI size not equal to 1

parent 04425000
No related branches found
No related tags found
No related merge requests found
...@@ -381,6 +381,8 @@ Malwina Dollinger ...@@ -381,6 +381,8 @@ Malwina Dollinger
CT-138 CT-138
march Korda march Korda
SVC-1020 SVC-1020
Marine Kelley
STORM-281
Matthew Dowd Matthew Dowd
VWR-1344 VWR-1344
VWR-1651 VWR-1651
......
...@@ -880,8 +880,10 @@ void LLWorldMapView::drawFrustum() ...@@ -880,8 +880,10 @@ void LLWorldMapView::drawFrustum()
F32 half_width_meters = far_clip_meters * tan( horiz_fov / 2 ); F32 half_width_meters = far_clip_meters * tan( horiz_fov / 2 );
F32 half_width_pixels = half_width_meters * meters_to_pixels; F32 half_width_pixels = half_width_meters * meters_to_pixels;
F32 ctr_x = getLocalRect().getWidth() * 0.5f + sPanX; // Compute the frustum coordinates. Take the UI scale into account.
F32 ctr_y = getLocalRect().getHeight() * 0.5f + sPanY; F32 ui_scale_factor = gSavedSettings.getF32("UIScaleFactor");
F32 ctr_x = (getLocalRect().getWidth() * 0.5f + sPanX) * ui_scale_factor;
F32 ctr_y = (getLocalRect().getHeight() * 0.5f + sPanY) * ui_scale_factor;
gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE); gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment