The Direct3D Device

The root of all drawing in Direct3D is the device class. You can think of this class as analogous to the actual graphics device in your computer. A device is the parent of all other graphical objects in your scene. Your computer may have zero or many devices, and with Managed Direct3D, you can control as many of them as you need.

There are three constructors that can be used to create a device. For now, we're only going to use one of them; however we will get to the others in later chapters. The one we're concerned about takes the following arguments:

public Device ( System.Int32 adapter , Microsoft.DirectX.Direct3D.DeviceType deviceType ,
  System.Windows.Forms.Control renderWindow , Microsoft.DirectX.Direct3D.CreateFlags ...

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

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.