message: Make display link callback a lambda function
diff: #import <GL/glew.h>
  #import <Cocoa/Cocoa.h>
  +#import <CoreVideo/CoreVideo.h>
  #import <OpenGL/OpenGL.h>
  #import <OpenGL/gl.h>
  @@ -89,17 +90,34 @@ using namespace visionaray;
  ];
  }
  -static CVReturn display_link_callback(
  - CVDisplayLinkRef display_link,
  +- (void) registerDisplayLink
  +{
  + // Regiser display link for continuous rendering
  +
  + gl_context = [[NSOpenGLContext alloc]
  + initWithFormat: gl_format
  + shareContext: nil
  + ];
  +
  + GLint swap_int = 1;
  +
  + [gl_context setValues:&swap_int forParameter:NSOpenGLCPSwapInterval];
  +
  + CVDisplayLinkCreateWithActiveCGDisplays(&display_link);
  +
  + CVDisplayLinkSetOutputCallback(
  + display_link,
  + [](
  + CVDisplayLinkRef disp_link,
  CVTimeStamp const* now,
  CVTimeStamp const* output_time,
  CVOptionFlags flags_in,
  CVOptionFlags* flags_out,
  void* display_link_context
  )
  -
  + -> CVReturn
  {
  - VSNRAY_UNUSED(display_link, now, output_time, flags_in, flags_out);
  + VSNRAY_UNUSED(disp_link, now, output_time, flags_in, flags_out);
  graphics_view* view = static_cast<graphics_view*>(display_link_context);
  @@ -118,24 +136,9 @@ static CVReturn display_link_callback(
  [view unlockFocus];
  return kCVReturnSuccess;
  -}
  -
  -- (void) registerDisplayLink
  -{
  - // Regiser display link for continuous rendering
  -
  - gl_context = [[NSOpenGLContext alloc]
  - initWithFormat: gl_format
  - shareContext: nil
  - ];
  -
  - GLint swap_int = 1;
  -
  - [gl_context setValues:&swap_int forParameter:NSOpenGLCPSwapInterval];
  -
  - CVDisplayLinkCreateWithActiveCGDisplays(&display_link);
  -
  - CVDisplayLinkSetOutputCallback(display_link, &display_link_callback, self);
  + },
  + self
  + );
  CGLContextObj cgl_context = [gl_context CGLContextObj];
  