Getting Started

Before we begin developing our first Managed Direct3D application, we need to get our environment ready. To accomplish this, follow these steps:

  1. The first thing we'll want to do will be to load Visual Studio.NET and create a new project.

  2. Let's select the Visual C# projects area, and create a new Windows Application project. We will need a place to do our rendering, and the standard Windows Form that comes with this project works perfectly.

  3. Name the project whatever you like and create the new project.

After the project is created, we will need to make sure the Managed DirectX references are added to the project so we can use the components. Click the Add References menu selection in the project menu, and add the Microsoft.DirectX as well as the Microsoft.DirectX.Direct3D reference. For now, that's all we'll need.

With the references now loaded into the project, we could get right into writing some Managed DirectX code, but before we do that, we should add two new items into our "using" clauses so we don't need to fully qualify everything we'll be using. You can do this by opening the code window for the main windows form in your application (by default form1.cs) and adding the following lines at the end of the using clauses:

 using Microsoft.DirectX; using Microsoft.DirectX.Direct3D; 

While this step isn't necessary, it saves a lot of typing, since you won't need to fully qualify each item before using it. Now, we are ready to start writing our first Managed DirectX application.



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