You MUST render the model again in order to see any changes such as switching textures.
using System;using System.Collections.Generic;using Microsoft.Xna.Framework;using Microsoft.Xna.Framework.Audio;using Microsoft.Xna.Framework.Content;using Microsoft.Xna.Framework.GamerServices;using Microsoft.Xna.Framework.Graphics;using Microsoft.Xna.Framework.Input;using Microsoft.Xna.Framework.Net;using Microsoft.Xna.Framework.Storage;namespace SwitchTexture{ public class SwitchTextureGame : Microsoft.Xna.Framework.Game { GraphicsDeviceManager graphics; // Create an array for holding 2 textures which we will switch between Texture2D[] textures = new Texture2D[2]; // The index of the texture to use int currentTexture = 0; // The model we will be rendering with the current texture Model model = null; public SwitchTextureGame() { graphics = new GraphicsDeviceManager(this); Content.RootDirectory = "Content"; } protected override void LoadContent() { // Load both textures textures[0] = Content.Load<Texture2D>("textures\\gold"); textures[1] = Content.Load<Texture2D>("textures\\silver"); // And the model we want to use model = Content.Load<Model>("models\\sphere"); } protected override void Update(GameTime gameTime) { // Allow switching the texture if (Keyboard.GetState().IsKeyDown(Keys.Space)) currentTexture = 1; // SPACE DOWN: use silver texture else currentTexture = 0; // SPACE UP: use gold texture base.Update(gameTime); } protected override void Draw(GameTime gameTime) { graphics.GraphicsDevice.Clear(Color.CornflowerBlue); // Draw the model foreach (ModelMesh mesh in model.Meshes) { foreach (BasicEffect effect in mesh.Effects) { // Make sure lighting and texturing is enabled so we can see the result effect.EnableDefaultLighting(); effect.TextureEnabled = true; // Begin to render with the specified texture effect.Texture = textures[currentTexture]; effect.World = Matrix.Identity; effect.View = Matrix.CreateLookAt(new Vector3(0.0f, 2.0f, 5.0f), Vector3.Zero, Vector3.Up); effect.Projection = Matrix.CreatePerspectiveFieldOfView(MathHelper.PiOver4, 800.0f / 600.0f, 1.0f, 100.0f); } // Draw the mesh mesh.Draw(); } base.Draw(gameTime); } } public class Application { public static void Main(string[] args) { SwitchTextureGame game = new SwitchTextureGame(); game.Run(); } }}