Platform SDK: DirectX

Step 2: Initialize System Objects

[C++]

This section pertains only to application development in Visual Basic. See Direct3D Immediate Mode C/C++ Tutorials.

[Visual Basic]

After you create an application window, you can begin initializing the essential DirectX objects you need to render the scene. For a Direct3D application, this entails creating and configuring DirectDraw, rendering surfaces, a rendering device, and a viewport.

The Triangle tutorial application performs system initialization in the InitDDraw application-defined subroutine, called from the Form_Load procedure. The steps executed in the InitDDraw subroutine are presented in the following sub-steps: