After creating the primary Direct3D-related objects—a DirectDraw object, a rendering device, and a viewport—you can begin initializing the scene by setting up geometry, preparing materials, and configuring the transformation matrices your application will use. The Triangle sample uses an application-defined function, App_InitDeviceObjects, to perform the following steps that initialize the scene: