In computing, WinG is an application programming interface that was designed to provide faster graphics performance on Windows 3.x operating environments, and was initially positioned as a way to help game developers more easily port their DOS games to Microsoft Windows, although it was quickly discontinued in favor of DirectX.
Background
WinG fixed two problems. The first problem that WinG fixed was that Windows 3.x did not support creating Device Contexts based on device independent bitmaps, only actual display devices. One major limitation of the GDI DCs was that they were write-only. Data, once written, could not be retrieved. The second problem was that all GDI drawing was implemented in the Windows 3.x video drivers. This included the drawing of bitmaps. Obviously performance of such routines varied across drivers. Alex St. John, one of the creators of DirectX, said in a 2000 interview that, Microsoft announced WinG at the 1994 Game Developers Conference, demonstrating it with a port by id Software of Doom. WinG was shipped on September 21, 1994. WinG, while interesting, was still fundamentally based on drawing bitmaps in memory and outputting frames after the drawing was done. As a result, WinG was deprecated and DirectX was built. However, Windows NT 3.5 and Windows 95 introduced CreateDIBSection to provide support for creating DCs based on DIBs and video drivers also eventually improved.
Implementation
WinG introduced a new type of DC called a WinGDC, which allowed programmers to both read and write to it directly using device-independent bitmaps with the wingdib.drv driver. Effectively, it gave programmers the ability to do with Windows what they'd been doing without hardware access limitations in DOS for years. Programmers could write DIBs to the WinGDC, yet would still have access to the individual bits of the image data. This meant that fast graphics algorithms could be written to allow fast scrolling, overdraw, dirty rectangles, double buffering, and other animation techniques. WinG also provided much better performance when blitting graphics data to physical graphics device memory. Since WinG used the DIB format, it was possible to mix original GDI API calls and WinG calls. WinG would also perform a graphics hardware/driver profiling test on the first execution of the program in order to determine the best way to draw DIBs. This test showed a window full of red curved lines, sections of which would wobble as performance was tested. Once WinG had determined the fastest calls that did not cause graphics corruption, a profile would be saved so that the test would not need to be performed again.
Support
WinG out-of-the-box support was dropped in Windows 98 Second Edition, as it did absolutely nothing but pass through to the Win32 APIs that it was wrapping. WinG DLLs were sometimes distributed with an application, at which point it merely became a matter of copying the files wing.dll, wing32.dll, wingde.dll, wingdib.drv and wngpal.wnd to the system32 directory or SysWOW64 directory to regain system-wide support.