From: FX (fxcoudert_at_gmail.com)
Date: Sun Sep 30 2012 - 14:26:29 CDT

Hi John,

> VMD uses FLTK to open and manage the OpenGL window on the
> MacOS X platforms. To support the new retina display, the code in
> FLTK will have to be updated accordingly. Until FLTK is updated
> to support the retina display, there's not much to do on the VMD side.

OK. I knew for the user interface, but I assumed that the OpenGL window was handled differently.

I compiled a fresh FLTK (weekly snapshot, fltk-1.3.x-r9687), and it seems that it handles Retina display fine (with the exception of the "overlay" test, for some reason… maybe in that particular case it renders the UI into an intermediate buffer, which does not get the right dimensions).

However, it fails to allocate GL bitmaps of the correct size: GL pixels are not equal to Cocoa pixels, but to physical screen pixel (in Retina mode, Cocoa pixel = 2 screen pixels). So, a fix for FTLK is needed there.

> This is somewhat complicated by the fact that the retina display is
> likely not supported at all under the older Carbon APIs used by the
> previous stable revs of VMD, and so this probably also requires using
> Cocoa, and that most likely requires that we would also use the
> experimental branch of Tcl/Tk with Cocoa support. The only problem with
> that last part is that combination has already been tried, for the
> experimental 64-bit builds of VMD, and thus far it's not nearly as stable
> as the older revs of FLTK, Tcl/Tk, based on the original Carbon APIs…

Well, that is inevitable in the long run.

> Anyway, the work to do in VMD is likely minimal, most of what is involved
> affects FLTK and getting FLTK and Tcl/Tk to cooperate well with Cocoa.

You're right. Thanks for the information. I'll try to work on that when I have some free time.

Cheers,
FX