2
Introduction
which would later be renamed to something you might be more familiar with—DirectX.
It is somewhat humorous that the X that is everywhere started off as a joke.The original
APIs released in DirectX 1.0 were DirectDraw, DirectInput, and DirectSound.The X was
used as shorthand to replace each of the actual API component names to talk about the
whole group, and that X soon became the official name. It migrated all the way through
to the original Xbox to XNA.
Before DirectX, making games was much more difficult than it is today.There wasn’t a
standard way of talking to the various pieces of hardware that existed on all the comput-
ers, so if you wanted to write a game that worked for everything, you had to write special
code for each piece of hardware you wanted to support.With DirectX, there was a stan-
dard way of accessing the hardware, and game developers and hardware manufacturers all
over rejoiced!
DirectX has gone through quite a few versions, adding new functionality as it devel-
oped (such as 3D graphics, networking, and music) and is now on version 11 that shipped
with Windows 7.When people talk about DirectX 11, though, they are almost always
talking about Direct3D 11, as no other components have changed since DirectX9.
I got ahead of myself, though. Let’s backtrack a little to DirectX 7.0.This was the first
version of DirectX that included functionality for a language other than C, as it included
DirectX for Visual Basic.This was actually when I joined the DirectX team, specifically to
work on that portion of the product. I continued to work on it through DirectX 8.0.
DirectX 8.0 was the first version to include programmable shaders, something you
read more about in Chapter 8. It’s actually hard to believe how far we’ve come since
then, as there isn’t any way to write graphics code without shaders! DirectX 8.0 is also
the time I began looking at this funny thing called .NET.
DirectX 9.0 was the first release of DirectX that included a component specifically
designed for the Common Language Runtime (CLR).This component is Managed
DirectX.A lot of work went into that project and although it looked only vaguely famil-
iar to people using DirectX, it fit right in for people using C# and the other managed
languages.
The response Managed DirectX received was surprising and a bit overwhelming.
Although DirectX for Visual Basic had expanded the development audience, Managed
DirectX did so even more.The API was cleaner, easier to use, and felt like all of the other
managed components that were out there.The biggest worry then (and one you still hear
about today) was related to performance. No one could believe that a managed API (par-
ticularly one with a garbage collector) could run fast.
After spending a few years working on Managed DirectX, I left the DirectX team in
January of 2006 to join a new group that wanted to develop this thing called XNA,
which was eventually released late in 2006 as XNA Game Studio Express.
Game Studio changed all the rules. It took the ease of use and power that Managed
DirectX had, made it even easier and more powerful, and added the capability to run
games on an Xbox 360. Historically, game consoles have always been closed systems,
including the Xbox 360. Before Game Studio, the only way to run code on an Xbox 360
www.it-ebooks.info