Skip to content

Render window 1/4 size with QT5, OSX, Retina display #1077

@jonfink

Description

@jonfink

System:

  • OSX 10.11
  • ROS Kinetic
  • QT 5.7.1 (homebrew)
  • Ogre 1.9.0 (homebrew osrf/simulation tap)
  • RVIZ 1.12.4

After launching Rviz, the render window seems to only draw for the lower-left 1/4 of it's total space:

screen shot 2017-01-18 at 11 48 29 am

I've traced this problem back to be related to Qt5's "support" for retina displays (where the rendering units are scaled).

Realizing that this problem was recently addressed by the Ogre development team, I tried the same fix locally (since I am using Ogre 1.9):

In ogre_helpers/render_system.cpp

  params["macAPI"] = "cocoa";
  params["macAPICocoaUseNSView"] = "true";
  // Adding this param for retina display scaling
  params["contentScalingFactor"] = "2.0";

Obviously, this fix requires a number of checks (for presence of Qt5 + Ogre 1.9 and check for retina display) before a merge request can be considered but I wanted to report here in case others are hitting the same issue.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions