Resources:
- msdn XNA reference: http://msdn2.microsoft.com/en-us/library/bb197298.aspx
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:- Displays, Client Bounds, Viewports, and Back Buffers
- Render Targets
- Effects States
- 2D Graphics
- 3D Graphics
How to?
2D How to?
The msdn list can be found here.- How To: Draw a Sprite
- How To: Animate a Sprite
- How To: Draw a Masked Sprite over a Background
- How To: Make a Scrolling Background
- How To: Rotate a Sprite
- How To: Rotate a Group of Sprites
- How To: Scale a Sprite
- How To: Tile a Sprite
- How To: Tint a Sprite
- How To: Scale Sprites Based On Screen Size
- How To: Draw Point Sprites
- How To: Apply a Pixel Shader to Sprites
- How To: Draw a Sprite Over a Model
- How To: Draw Text
3D How to?
The msdn list can be found here.- How To: Check for Shader Model 2.0 Support
- How To: Enable Antialiasing (Multisampling)
- How To: Use BasicEffect
- How To: Render a Model
- How To: Create and Use a Custom Vertex
- How To: Draw Points, Lines, and Other 3D Primitives
- How To: Create and Apply Custom Effects
- How To: Draw a Model with a Custom Effect
- How To: Create Custom Texture Effects
- How To: Draw a Textured Quad
- How To: Use Viewports for Split Screen Gaming
- How To: Create a SkySphere
- How To: Draw a Shadow
- How To: Use EffectParameters and EffectTechniques
- How To: Create a Depth Texture
- How To: Implement Shadow Mapping