Seg3D icon indicating copy to clipboard operation
Seg3D copied to clipboard

Support high-dpi rendering

Open krismz opened this issue 9 years ago • 3 comments

Support high-dpi rendering on retina displays and other such displays. Investigate what this requires, being careful with pixel vs point transformations.

Recommend starting with https://developer.apple.com/library/mac/documentation/GraphicsAnimation/Conceptual/HighResolutionOSX/Introduction/Introduction.html and also looking at whether glewExperimental = GL_TRUE is necessary.

It's possible that this will be fixed or at least handled differently with Qt5.

krismz avatar Feb 16 '16 22:02 krismz

To get high-dpi working on Mac with Qt 5.4 or greater:

  1. set NSHighResolutionCapable to true in CMake/Modules/MacOSXBundleInfo.plist.in. This will get the fonts rendered appropriately.
  2. scale opengl rendering, converting to/from points appropriately. Be sure that mouse picking is also scaled appropriately
  3. Connect to the signal indicating the window has been dragged to a display with different dpi, and adjust the scale factor in the opengl rendering appropriately.

Follow these guides for Linux, Windows: http://doc.qt.io/qt-5/highdpi.html.

For Qt5.4 or Qt5.5 on other OS:

  1. Do the changes as for Mac, Qt5.4
  2. Set the environment variable QT_DEVICE_PIXEL_RATIO to 2 (or possibly auto)

For Qt5.6 on other OS, the behavior should be the same as for Mac, Qt5.4 and should no longer need that environment variable set.

krismz avatar May 31 '16 17:05 krismz

This is still a problem on hi dpi displays in windows and linux. On OS X the resolution scales fine, though some text is rendered a little blurry.

jessdtate avatar Mar 05 '18 06:03 jessdtate

#349 is related

allywarner avatar Aug 06 '20 18:08 allywarner