From: John Stone (
Date: Thu Apr 26 2018 - 17:30:17 CDT

  Have you submitted the patch to the FLTK maintainers yet?
I have worked with the FLTK maintainers on quite a few patches in the
past and if you can get them involved it'll be a big help in ensuring
that this continues to work going forward. It took a long time to
get the original FLTK+Tk use case to work when 64-bit Cocao first arose,
so keeping awareness of this usage within the FLTK team is important,
particularly since Apple is entirely dropping 32-bit support going forward.

  John Stone

On Fri, Apr 27, 2018 at 12:14:45AM +0200, FX wrote:
> Hi all,
> Apple has announced the end of support for 32-bit applications on its next macOS major version (macOS 10.14). Thus, compilation of VMD in 64-bit mode with the latest FLTK version needs to be achieved. This was previously failing, due to an issue I reported in 2016:
> I am glad to say I have found the root cause of the issue, and a patch for it. It appears the bug was in FLTK itself, in its handling of OpenGL windows in Cocoa mode, where buffers weren???t flushed correctly. The attached one-line patch, which applied on top of fltk-1.3.4-2, fixes the issue and VMD 1.9.4a17, compiled from source in 64-bit mode (no CUDA), is fully functional.
> Best regards,
> FX

> diff -pur fltk-1.3.4-2.old/src/Fl_Gl_Window.cxx fltk-1.3.4-2/src/Fl_Gl_Window.cxx
> --- fltk-1.3.4-2.old/src/Fl_Gl_Window.cxx 2016-06-22 07:44:14.000000000 +0200
> +++ fltk-1.3.4-2/src/Fl_Gl_Window.cxx 2018-04-27 00:04:06.000000000 +0200
> @@ -276,10 +276,8 @@ void Fl_Gl_Window::swap_buffers() {
> glMatrixMode(matrixmode);
> glRasterPos3f(pos[0], pos[1], pos[2]); // restore original glRasterPos
> }
> - /* // nothing to do here under Cocoa because [NSOpenGLContext -flushBuffer] done later replaces it
> - else
> - aglSwapBuffers((AGLContext)context_);
> - */
> + else
> + Fl_X::GLcontext_flushbuffer(context_);
> #else
> # error unsupported platform
> #endif

NIH Center for Macromolecular Modeling and Bioinformatics
Beckman Institute for Advanced Science and Technology
University of Illinois, 405 N. Mathews Ave, Urbana, IL 61801           Phone: 217-244-3349