Loading Meshes with Animation

The basic hierarchy of the mesh has been established. Now, all you need to do is write some code to actually use it. Before you do that, though, you will need to initialize your graphics device. You should use a method similar to the programmable pipeline examples earlier, so use the method found in Listing 13.4.

Listing 13.4. Initializing Your Graphics
 public bool InitializeGraphics() { // Set our presentation parameters PresentParameters presentParams = new PresentParameters(); presentParams.Windowed = true; presentParams.SwapEffect = SwapEffect.Discard; presentParams.AutoDepthStencilFormat = DepthFormat.D16; presentParams.EnableAutoDepthStencil = true; bool canDoHardwareSkinning = true; // Does a hardware device ...

Get Managed DirectX® 9 Kick Start: Graphics and Game Programming now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.