WinG

WinG
Placeholder.png
Typegraphics library
Codename
Developer(s)Microsoft
Operating systemWindows 3.1x
Supported platformsx86
Initial release version1.0
Initial release date1994
Latest release version
Latest release date
Latest pre-release version
Latest pre-release date
Other name(s)
License
Website
Succeeds
Successor

WinG is a library for Windows 3.1x, which is a back-port of an early version of the Chicago DIB engine.

Overview[edit | edit source]

Most of WinG functions are parallels to GDI calls added in Windows 95 and Windows NT 3.5, with WinGCreateBitmap being equivalent to CreateDIBSection, WinGSetDIBColorTable to SetDIBColorTable, WinGCreateDC to CreateCompatibleDC, etc. Fundamentally, WinG allows the programmer to create a device context based on a device-independent bitmap, and similarly to the DIB engine it uses GDI to draw into it and quickly draw that device context to the screen.

WinG defines two main types: WinGBitmap and WinGDC. A WinGBitmap is essentially a special HBITMAP, which can only be selected into a WinGDC, a special type of device context owned by WinG. This device context can be passed into most standard GDI functions, where the DIB engine (WINGDE.DLL) will draw onto the DIB. However, in order to blit the WinG bitmap onto the screen, special functions WinGBitBlt or WinGStretchBlt must be used. This allows WinG to bypass GDI and draw the bitmap backing the WinGDC directly into the framebuffer, wherever the target display context is located on the screen. WinG is able to directly access the framebuffer using DVA or DCI.

Many early Windows 95 games, such as WinDoom (which was the initial demonstration of WinG’s ability to facilitate fast-paced gaming on Windows) and Fury3 use WinG (often in conjunction with Win32s), but it was soon discontinued and superseded by DirectDraw. Another well-known application using WinG acceleration is Microsoft Bob. During Windows 95's development, WinG was heavily promoted, though by the time Windows 95 had come out, WinG had been superseded by DirectDraw.

On Windows 95 / NT 3.5 and later, the WinG DLLs are simply wrappers around GDI.