Skip to content
  • Chun-wei Fan's avatar
    gdkglcontext-win32.c: Fix running with Mesa drivers · a16aa7d4
    Chun-wei Fan authored
    Some GL drivers such as Mesa-D3D12 do not allow one to call SetPixelFormat() on
    a given HDC if one pixel format has been already set for it, so first check the
    HDC with GetPixelFormat() to see whether a pixel format has already been set
    with the HDC, and only attempt to acquire the pixel format if one has not been
    set.
    
    This will fix running with GL on Windows using the Mesa drivers.
    a16aa7d4