
In this tutorial, we will use our windowed program skeleton developed in the previous tutorial to build a DirectDraw program. We will learn techniques of full-screen DirectDraw applications, including bitmaps, sprites, page flipping and idle-time processing. We will go on to discuss DirectInput and DirectX Audio, and discuss proper error handling and co-operation with other applications. We will investigate the use of the new DirectX Graphics 3D API for 2D graphics. Finally, we will develop this into a framework you can use to build your own DirectX applications.
For the previous tutorial, the code was in C, compilable with a C++ compiler. This must now change. DirectX is accessible from C, but it's far quicker and easier to write in C++. I strongly recommend that you compile all DirectDraw code with a C++ compiler. Don't worry, there's nothing new to learn - we're just doing this to simplify the DirectX code. All the rest will remain in C.
You will need:
Download this tutorial in ZIP format (does not include code ZIP files).