David Joffe's Guide to Programming Games with DirectX
Chapter 1: Introduction to DirectX
1.1 A few quick words about these articles This document is provided as is, blah blah blah, I am not responsible if it in any way causes harm to you.
The samples in this document are developed for Visual C/C++ MFC applications, but most of the material covered is pretty much MFC-independent.
1.2 What is DirectX? DirectX is Microsoft's answer to the questions of Game Developers who wanted to know how they were going to write games optimally under Windows95. Games normally require a lot of computing power for their high-speed graphics, and Windows95 was "getting in the way".
DirectX is an API (Application Programming Interface) which provides a lot of functionality that is useful mostly in games programming but in other applications as well. DirectX consists of, at the moment, 5 main sections, as shown in the table below.
1.2.1 DirectX Components 1.3 DirectX performance and hardware acceleration Although the performance of Direct3D in software only is not too shabby at all, DirectX is designed with hardware acceleration in mind. This means that graphics board vendors can create cards that support DirectDraw and Direct3D functionality on board, in hardware; and supply relevant DirectX drivers for the card. Allowing these functions to be performed on board the graphics card frees the CPU (Central Processing Unit) to do other things. Typical Direct3D accelerators would also have at least 2 or preferably 4 or more Megabytes of onboard RAM to store bitmaps (computerised images made up of small dots called "pixels"), textures, sprites, overlays and more.
DirectDraw and Direct3D are built as a relatively thin layer above the hardware, using what is called the DirectDraw "hardware abstraction layer" (HAL). For functionality not provided by a certain card, an equivalent software implementation would be provided through the "hardware emulation layer" (HEL).
DirectDraw 2 dimensional graphics capabilities, surfaces, double buffering, etc Direct3D A relatively extensively functional 3D graphics programming API. DirectSound Sound; 3D sound DirectPlay Simplifies network game development DirectInput Handles input from various peripherals
Diagram not yet illustrating the DirectDraw/Direct3D HAL.
Article updated: 2 September 1997
Article by David Joffe; http://www.geocities.com/SoHo/Lofts/2018/