Getting started with DirectX10 - Part 1: Opening a window

Introduction

You all heard about DirectX 10, but there are no DirectX games available yet! So the only app’s you can run, are your own, and of course the DirectX 10 tutorials. So it’s like discovering a new continent, and af course, a lot of fun!

Prerequisites

We need Windows Vista, DirectX 10 hardware, Visual Studio 2005 (free express), with SP1 and the Vista patch. We also need the Direct X 10 SDK, free to download from the Microsoft website.
What if you don’t have the hardware yet? Well, you can run the DirectX 10 applications, using a reference device. You’ll only get framerates of 1 fps, on a 240×180 pixel window! From April 17, budget dx10 cards are available from nvidia, and in may ati will release their DX10 hardware. Performance is not needed for these simple tutorials, so the low cost cards will suffice.

Installation tips

First we install Vista with downloaded updates, then the video card driver. Next is Visual Studio, and it’s SP1. Don’t forget the Vista patch. Now we start installing the DirectX 10 SDK, the newest edition. Be carefull though: Vista uses “User Account Control”. This prevents the SDK tutorials to compile if the SDK is installed in the default location. Visual Studio can’t write in “program files”. I installed the SDK in my home directory. Better is to install it in C:\Users\Public. The debugger symbols are installed in the Visual Studio directory.
Next we check the Visual Studio configuration to see if all paths are correct. Open tools/options and in the Options window we select “Project and Solutions/VC++ Directories. Choose Include files and libraries and be sure that the DirectX 10 SDK paths are included. We also add our debugging symbols path in the debugging/symbols list.

includes librariespath debugging symbols

Opening a Direct10 Window

Now we are ready to create our first application:

Create a new win32 application:

New Project Application Settings

In the project Property settings, add d3d10.lib en d3dx10.lib to the additional dependencies in the Linker Input window.

Additional Project dependencies

Now, you can build the project. After launching it, we see an empty window. Nothing special yet…

I’m not explaining the win32 code, as there ara a lot of win32 tutorials on the web.

This concludes part1. In the next chapter we initialise our Direct3D Device.