Making the Helworld Sample

This tutorial includes all the code for a working Direct3D Retained-Mode application. If you copy the code from this tutorial into a single .c file, you can compile and run it if:

ˇyou have the Direct3D header files (d3d.h, d3drm.h, and so on) in your include path

ˇyou link with the Winmm.lib, D3drm.lib, and Ddraw.lib static libraries

ˇyour compiler can find the Sphere3.x file in the DirectX SDK's media directory

ˇyou supply a bitmap called tutor.bmp

Note that this bitmap must have pixel dimensions that are a power of 2; for example, a 16 by 16 pixel bitmap, a 128 by 1024 pixel bitmap, a 512 by 256 pixel bitmap, and so on.

Most of the code responsible for 3-D effects in this sample has been broken out into discrete functions so that you can modify parts of the system incrementally in your own experiments. You should look at the samples in the SDK for implementations of more complicated features of Direct3D.

The following topics describe some of the concerns that apply to the overall development of a simple Direct3D Retained-Mode application.

ˇLimitations of the Sample

ˇDirectDraw's Windowed Mode