Showing posts with label directx. Show all posts
Showing posts with label directx. Show all posts

2006/08/21

DirectX Programming with Visual C++ 2005 Express Edition

At some point I feel like I should embrace the winner in graphics APIs for computer games and learn DirectX (seriously, this time). In some obvious attempt to entice me, Microsoft began offering the Visual C++ 2005 Express Edition for free.

I looked at how to get it setup for DirectX development and these are my notes. You obviously need it and the DirectX SDK to start with.


  1. Setup the Platform SDK as described here here.

  2. Start Visual C++

  3. File->New->Project

  4. For "Project type" select "Visual C++" or "Win32" and create a "Win32 Console Application".

  5. When the Win32 Application Wizard comes up, make sure you select "Windows applicaiton" for the "Application type", and "Empty project" from "Additional options".

  6. Project->Add New Item. Select "C++ File".

  7. Project->Properties. Configuration Properties->Linker->Input. Add necessary DirectX libraries (ddraw.lib, dxguid.lib, etc.) to "Additional Dependencies".

Out with OpenGL, in with DirectX

I'll admit, I was originally in the OpenGL camp. OpenGL + GLUT was just vastly easier than DirectX for those of us with no Windows programming experience (even with the "easy to use" application framework they introduced in DirectX 8 or 9). Plus, I was fortunate to use it in a graphics programming class I had as an undergrad.

However, as part of my renewed interest in game programming, the coming release of Vista and DirectX 10, and the apparent demise of OpenGL, I decided to give DirectX another shot. But that requires tools.

The DirectX SDK is easy enough. That's been freely available for some time. A compiler and other development tools... that's a different story. I'd known about Visual C++ Toolkit 2003 (now deprecated, free command-line tools) for sometime, but I didn't know that they'd gone another step further and introduced Visual C++ 2005 Express Edition. Basically the same thing, but now with an IDE to boot. Very sweet.

This actually got me to dust off my DirectX and WinAPI books and do a little Windows programming for the first time in quite a while.