Platform SDK: DirectX

Step 4.4: Call DoEvents

[C++]

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

[Visual Basic]

You can use the DoEvents function to enable the operating system to raise events that apply to your application. In this manner, your application will render individual frames of the scene after the operating system has processed the events in its queue. The Triangle application uses the following line of code to clear the events queue:

    DoEvents

After this call completes, the application returns to the top of the while loop, calling the application-defined subroutines RenderScene and FrameMove, respectively—rendering a single frame of the scene.

Now that you have your application running, you can go to the final step in the tutorial, Step 5: Shut Down.