Resources:

Overview

The Graphics Library is likely the most complex inside XNA. There is a huge number of different things you might want to learn and use in your game. This might be discouraging especially at the beginning, but in the other hand learning all this stuff is a very interesting experience, and since the capabilities of the hardware are far beyond those in the past, you can start implementing different blocks and compose them naively without the need to struggle too much for performance. It is true, though, that after a while you will likely reiterate over you graphics code, in order to build a better structure.

The official documentation is very good. It has a lot of examples, and explain the theoretical stuff at an appropriate depth. The Graphics Library as presented in the official documentation is split in:

The first topic is quite basic and fundamental in order to understand the conventions of XNA in managing the game window. As soon as you want to change resolution or do more advanced stuff as a split screen, you should go through it.

The second topic, as well as the third one, are useful in order to create advanced effects. Rendertargers are used to render scene inside specific buffers, that you can subsequently use in order to do crazy stuff as post processing effects, mirrors, or whatever you might think that involve the use of a rendered scene image. It is a rather advanced topic, and you can skip it at the beginning.

Shaders are a big part of the game graphics, and as soon as you want to have some eye candies, you need to understand shaders (in XNA called effects). Unfortunately the documentation about this topic is a bit cryptic if you don't have any experience. Nevertheless by following the various tutorials about effects you will start to recognize how things works, and afterwards the Effect State page will start make sense. So skip this part at the beginning, and come back after you did some basic tutorials.

The fourth part is very basic and useful, and it's the place where you should start. Even if your game is 3D based, you will have a lot of 2D graphics (game menu, in game HUD, ...). Here the concept "learn by doing" is the best way to go. Take a quick look to the overview, and then rush to the how to.

The fifth part follows the lines of the previous one, but it is quite more complicated. The reason is that the base knowledge required is wider. First of all take some time to visit the "What is" article" page, so that you get familiar with the main concepts. The Viewport and Frustum page is quite simple and you should recognize most of the stuff at first sight. On the other hand the Dynamic Vertex Buffer page might seem a bit more complex. Most of the time you will load external geometry stored in .fbx or .x files. However you might want to generate geometry from scratch and render it (as you do with OpenGL primitives). In order to do this, read this page. Finally go through the how to linked below.

How to?

2D How to?

The msdn list can be found here.

3D How to?

The msdn list can be found here.


Page URL: https://twiki.graphics.ethz.ch/bin/view/GameClass/GraphicsLibrary
2024-03-29
© 2024 Eidgenössische Technische Hochschule Zürich