[vtk-developers] HiDPI / Retina display support

Sean McBride sean at rogue-research.com
Wed Aug 10 12:32:30 EDT 2016


Hi all,

I'd like to start a bit of discussion/brainstorming on supporting HiDPI (aka "retina" in Apple world) displays.

To do it right I think needs some significant change and forethought.  While I'm familiar with the Mac case, it'd be nice to support this on other OSes properly too.

OpenGL is a pixel-based API, and the Cocoa view/window system no longer is.  They've abstracted a "point" to be defined as either 1x1 or 2x2 or whatever size, depending on the display.  So the OS gives view/window/event sizes/locations in points, and you must scale to get pixels, or vice versa.  Implications for OpenGL are summarized here:

<https://developer.apple.com/library/mac/documentation/GraphicsAnimation/Conceptual/HighResolutionOSX/CapturingScreenContents/CapturingScreenContents.html>

Some thoughts/questions:

- anyone know how other OSes deal with HiDPI displays?

- for OpenGL views on Mac, retina is opt-in (because it uses more memory and can be slower).  I guess we need to expose a new API to opt-in.  I would argue for it being opt-in also.

- which VTK API should be pixel-based, which should be point-based?  Presumably everything is pixel based today, do we want to change any?  If so, some API would need to change from int to double.

- tests that compare images... I guess new baselines at various scaling factors are needed?  Or the test system will need to learn to scale images?  or?

- we'll need some dashboards with HiDPI enabled... anyone have hardware, like an iMac, with an actual Retina display that could be used?

- we'll need to observe for the window moving from a display that supports retina to/from one that doesn't, ex: laptop with external monitor.

(PS: I had been drafting this email for a while, but I understand Mike Jackson is at kitware this week and working on this, so figured I'd send it off not fully baked... :) )

Cheers,

-- 
____________________________________________________________
Sean McBride, B. Eng                 sean at rogue-research.com
Rogue Research                        www.rogue-research.com 
Mac Software Developer              Montréal, Québec, Canada




More information about the vtk-developers mailing list