In Brief

We've covered the bare essentials for getting a triangle rendered, and then included code to make it spin around and get it lit inside our scene. In doing so, we've accomplished the following:

  • Created a Direct3D device attached to our windows form

  • Rendered a single colored triangle in our window

  • Rotated our triangle around our scene

  • Introduced a simple light to our scene

Compiling the code will show a window that looks much like Figure 1.7.

Figure 1.7. Spinning 3D triangle.

graphics/01fig07.gif

In our next chapter we'll look at how we can find out which options our device can support, and create our devices accordingly.



Managed DirectX 9 Graphics and Game Programming, Kick Start
Managed DirectX 9 Kick Start: Graphics and Game Programming
ISBN: B003D7JUW6
EAN: N/A
Year: 2002
Pages: 180
Authors: Tom Miller

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net