DirectX SDK |
This section pertains only to application development in Visual Basic. See Direct3D Immediate Mode C/C++ Tutorials.
For the Triangle tutorial, the application shut-down code is straight-forward:
Private Sub Form_Unload(Cancel As Integer) g_bRunning = False End Sub
In the preceding code, the Form_Unload procedure sets the global variable, g_bRunning to false, which terminates the rendering loop.