WinG
Encyclopedia
In computing, WinG is an application programming interface
Application programming interface
An application programming interface is a source code based specification intended to be used as an interface by software components to communicate with each other...

 that provides faster graphics performance on Windows 3.x
Windows 3.x
Windows 3.x can refer to either an individual or all of the following versions of Microsoft Windows:*Windows 3.0*Windows 3.1x*Windows 3.2...

 operating environment
Operating environment
The operating environment in engineering describes the circumstances surrounding and potentially affecting something that is operating. For example electronic or mechanical equipment may be affected by high temperatures, vibration, dust, and other parameters which comprise the operating...

s, and was positioned as a way to help game developers more easily port their DOS games to Microsoft Windows
Microsoft Windows
Microsoft Windows is a series of operating systems produced by Microsoft.Microsoft introduced an operating environment named Windows on November 20, 1985 as an add-on to MS-DOS in response to the growing interest in graphical user interfaces . Microsoft Windows came to dominate the world's personal...

. The WinG interface was also supported in Windows 95
Windows 95
Windows 95 is a consumer-oriented graphical user interface-based operating system. It was released on August 24, 1995 by Microsoft, and was a significant progression from the company's previous Windows products...

, Windows 98
Windows 98
Windows 98 is a graphical operating system by Microsoft. It is the second major release in the Windows 9x line of operating systems. It was released to manufacturing on 15 May 1998 and to retail on 25 June 1998. Windows 98 is the successor to Windows 95. Like its predecessor, it is a hybrid...

 and Windows NT 4.0
Windows NT 4.0
Windows NT 4.0 is a preemptive, graphical and business-oriented operating system designed to work with either uniprocessor or symmetric multi-processor computers. It was the next release of Microsoft's Windows NT line of operating systems and was released to manufacturing on 31 July 1996...

, but Windows 98
Windows 98
Windows 98 is a graphical operating system by Microsoft. It is the second major release in the Windows 9x line of operating systems. It was released to manufacturing on 15 May 1998 and to retail on 25 June 1998. Windows 98 is the successor to Windows 95. Like its predecessor, it is a hybrid...

 Second Edition, Windows 2000
Windows 2000
Windows 2000 is a line of operating systems produced by Microsoft for use on personal computers, business desktops, laptops, and servers. Windows 2000 was released to manufacturing on 15 December 1999 and launched to retail on 17 February 2000. It is the successor to Windows NT 4.0, and is the...

 and later versions of the operating system did not support it.

Background

The original Windows Graphics Device Interface
Graphics Device Interface
The Graphics Device Interface is a Microsoft Windows application programming interface and core operating system component responsible for representing graphical objects and transmitting them to output devices such as monitors and printers....

 (GDI) was designed with static images in mind, making its animation capabilities very limited. The GDI provides an interface to the graphics hardware that is device independent, that is, a program written using the GDI will work on all graphics and printer hardware, provided suitable Windows GDI drivers for the hardware are installed on the system. This means that graphics cannot be written to the physical framebuffer
Framebuffer
A framebuffer is a video output device that drives a video display from a memory buffer containing a complete frame of data.The information in the memory buffer typically consists of color values for every pixel on the screen...

 on the graphics hardware directly and must be written to a logical graphics "device context" (DC) provided by the GDI, which is then translated by the GDI and the device drivers to suit the target hardware device and is written to its physical frame buffer in an appropriate manner.

The major limitation of the GDI DCs was that they were write-only. Data, once written, could not be retrieved. This was because the contents of the DC was device dependent, and data read from it would make no sense to the programmer. In order to do animation
Animation
Animation is the rapid display of a sequence of images of 2-D or 3-D artwork or model positions in order to create an illusion of movement. The effect is an optical illusion of motion due to the phenomenon of persistence of vision, and can be created and demonstrated in several ways...

 using the GDI DC, all of the animation frames needed to be manipulated in system memory and then each frame needed to be copied into a GDI DC for display on the graphics device. This was a very slow process.

Alex St. John
Alex St. John
Alex St. John, along with Craig Eisler and Eric Engstrom, created the original Microsoft DirectX specification. Alex became a Windows game technology evangelist for DirectX through magazine articles and interviews on the newly created web....

, one of the creators of DirectX
DirectX
Microsoft DirectX is a collection of application programming interfaces for handling tasks related to multimedia, especially game programming and video, on Microsoft platforms. Originally, the names of these APIs all began with Direct, such as Direct3D, DirectDraw, DirectMusic, DirectPlay,...

, said in a 2000 interview that,
WinG first shipped on September 21, 1994. The success of WinG in enabling high-performance game development on Windows led directly to the inception of DirectX
DirectX
Microsoft DirectX is a collection of application programming interfaces for handling tasks related to multimedia, especially game programming and video, on Microsoft platforms. Originally, the names of these APIs all began with Direct, such as Direct3D, DirectDraw, DirectMusic, DirectPlay,...

, which became the standard game development platform for Microsoft Windows, and later for the Xbox
Xbox
The Xbox is a sixth-generation video game console manufactured by Microsoft. It was released on November 15, 2001 in North America, February 22, 2002 in Japan, and March 14, 2002 in Australia and Europe and is the predecessor to the Xbox 360. It was Microsoft's first foray into the gaming console...

 and Xbox 360
Xbox 360
The Xbox 360 is the second video game console produced by Microsoft and the successor to the Xbox. The Xbox 360 competes with Sony's PlayStation 3 and Nintendo's Wii as part of the seventh generation of video game consoles...

 video game consoles.

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 (DIBs) 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
DOS
DOS, short for "Disk Operating System", is an acronym for several closely related operating systems that dominated the IBM PC compatible market between 1981 and 1995, or until about 2000 if one includes the partially DOS-based Microsoft Windows versions 95, 98, and Millennium Edition.Related...

 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
Double buffering
In computer science, multiple buffering is the use of more than one buffer to hold a block of data, so that a "reader" will see a complete version of the data, rather than a partially-updated version of the data being created by a "writer"...

, 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 manipulate the graphics hardware. 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 (i.e. as a separate API to Win32) was dropped in Windows 98
Windows 98
Windows 98 is a graphical operating system by Microsoft. It is the second major release in the Windows 9x line of operating systems. It was released to manufacturing on 15 May 1998 and to retail on 25 June 1998. Windows 98 is the successor to Windows 95. Like its predecessor, it is a hybrid...

 Second Edition (which integrated DirectX
DirectX
Microsoft DirectX is a collection of application programming interfaces for handling tasks related to multimedia, especially game programming and video, on Microsoft platforms. Originally, the names of these APIs all began with Direct, such as Direct3D, DirectDraw, DirectMusic, DirectPlay,...

 6), as it did absolutely nothing but pass through to the Win32 APIs that it was wrapping. WinG DLL
Dynamic-link library
Dynamic-link library , or DLL, is Microsoft's implementation of the shared library concept in the Microsoft Windows and OS/2 operating systems...

s 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 to regain system-wide support.
The source of this article is wikipedia, the free encyclopedia.  The text of this article is licensed under the GFDL.
 
x
OK