Graphics Device Setup

This is one tutorial that I'm going to be changing the format of. Originally, this tutorial did only a couple of simple things that I've now made separate tutorials for in the Extra XNA Tutorials. These tutorials are:

Changing the Window Size - discusses how to set the game window's size
Setting the Window Title - discusses how to set the title of your game window

Feel free to take a look at these tutorials if you would like to learn how to do those tasks. If you don't need to, then feel free to just skip ahead to the next tutorial.

This specific tutorial will eventually be removed in a little while when I reorganize the site, since the material in this tutorial is covered in the other tutorials above.

Oh, and if you are going to continue on with the other tutorials, you should also do the following:

Create a GraphicsDevice instance variable called device as shown in the code below:

private GraphicsDevice device;

And then initialize it in the game's constructor, after the graphics variable has been initialized, with the following line of code:

device = graphics.GraphicsDevice;