anchor.diff:    iAttributes: array of GLint;
   begin
     Result := 0;
  -
  +  {$IFDEF MSWINDOWS}
     if not WGL_ARB_multisample or not Assigned(wglChoosePixelFormatARB) then
       Exit;
  -
  + {$ENDIF}
     SetLength(iAttributes,21);
     iAttributes[0] := WGL_DRAW_TO_WINDOW_ARB;
     iAttributes[1] := 1;
  
positive.code: 
  implementation
  
  
  function SetDCPixelFormat(h_DC:HDC; PixelFormat:Integer):boolean;
  var
    nPixelFormat: Integer;
    PixelDepth:integer;
    pfd: TPixelFormatDescriptor;
  begin
    PixelDepth := 32; //32bpp is common
  
    with pfd do begin
      nSize           := SizeOf(TPIXELFORMATDESCRIPTOR); // Size Of This Pixel Format Descriptor
      nVersion        := 1;                    // The version of this data structure
  
negative.code:   //Try to find mode with slightly worse AA before giving up
    repeat
      iAttributes[19] := AntiAliasing;
      {$IFDEF MSWINDOWS}
      ValidFormat := wglChoosePixelFormatARB(h_dc, @iattributes[0], nil, 1, @pixelFormat, @NumFormats);
      {$ENDIF}
      if ValidFormat and (NumFormats >= 1) then
      begin
        Result := pixelFormat;
  