"How To" Articles
XNA Game Studio 2.0
This section contains step-by-step procedures for certain 3D graphics techniques.
In This Section
- How To: Check for Shader Model 2.0 Support
- This example demonstrates how to determine if a graphics card supports Shader Model 2.0.
- How To: Enable Antialiasing (Multisampling)
- This example demonstrates how to use the GraphicsDeviceManager to enable antialiasing for your game. We use the CheckDeviceMultiSampleType method to determine what kind of antialiasing your game machine supports.
- How To: Use BasicEffect
- This example demonstrates how to create and initialize an instance of BasicEffect, initialize a vertex buffer that can be rendered by BasicEffect, and apply the effect and render the geometry.
- How To: Render a Model
- This example demonstrates how to load and render a model using the XNA Framework Content Pipeline.
- How To: Create and Use a Custom Vertex
- This example demonstrates how to create a custom vertex and use it to render a 3D primitive object.
- How To: Draw Points, Lines, and Other 3D Primitives
- In the XNA Framework, a 3D primitive is a special type of 3D shape that describes how the graphics device interprets vertices stored in a vertex array or vertex stream. This example demonstrates how to use the point, line, and triangle primitive types that are the basis for all low-level drawing calls in the XNA Framework.
- How To: Create and Apply Custom Effects
- This example demonstrates how to create a simple effect to set the diffuse color and world, view, and projection transformation of a 3D object.
- How To: Draw a Model with a Custom Effect
- This example demonstrates how to load a Model file and draw the Model using a custom Effect without modifying the Content Pipeline.
- How To: Create Custom Texture Effects
- This example builds on the demonstrations How To: Draw Points, Lines, and Other 3D Primitives and How To: Create and Apply Custom Effects to demonstrate how to create an effect to apply a texture to a 3D primitive object.
- How To: Draw a Textured Quad
- This example demonstrates how to create and draw a simple quad using DrawUserIndexedPrimitives.
- How To: Use Viewports for Split Screen Gaming
- This example demonstrates how to use the Viewport property to display different scenes to different parts of the screen.
- How To: Create a SkySphere
- This example demonstrates how to create an effect that will apply a skybox-style TextureCube ("cube map") to a sphere.
- How To: Draw a Shadow
- This example demonstrates how to draw a shadow using Matrix.CreateShadow and the stencil buffer.
- How To: Use EffectParameters and EffectTechniques
- This example demonstrates how to use EffectParameters objects to interface with effect variables, and use EffectTechniques to access different techniques in an Effect.
- How To: Create a Depth Texture
- This example demonstrates how to create a texture that contains depth information for a scene using a customized RenderTarget2D, DepthStencilBuffer, and a simple Effect.
- How To: Implement Shadow Mapping
- This example demonstrates how to use depth textures (that is, shadow maps) to create dynamic shadows in a scene. These shadows move when a light source moves, and are accurate against both flat and irregular surfaces.