GraphicsDeviceManager graphics; SpriteBatch spriteBatch; Texture2D pixel;
spriteBatch = new SpriteBatch(GraphicsDevice); pixel = new Texture2D(GraphicsDevice, 1, 1); pixel.SetData(new[] Color.White ); xna framework 3.1
public Game1()
GraphicsDevice.Clear(Color.CornflowerBlue); spriteBatch.Begin(); spriteBatch.Draw(pixel, new Rectangle(100, 100, 200, 50), Color.Red); spriteBatch.End(); base.Draw(gameTime); spriteBatch = new SpriteBatch(GraphicsDevice)
protected override void Draw(GameTime gameTime) pixel = new Texture2D(GraphicsDevice