   XNA Pixel Coloring
  Hi there.I was just wondering if it was possible with XNA to create a background and have set the Color of Random Pixels. the idea I was thinking of is a starry background. with twinkling stars.I have done this in C++ by using SetPixel() However i am Unfamiliar with anything like this is C# / XNA   
  Use the Texture2D.SetData() method, with an array of colors or Vector4s. Then draw that texture as your background.SetData is very slow however and you're at risk of pipeline stalls if you're changing large amounts of data.   ;  Ok. so if I have a black Texture (Texture2D myTexture;) myTexture.SetData()?What if I don't want the background to be a texture? is it possible to do it this way?EDIT : usefull to know the way im thinkingin C++ i set the background to black. then randomly picked 100 Pixels and turned them White with SetPixel();   ;  changing pixels in black texture to simulate stars seems kind of old.. C approach.In C#/XNA I would use randomly appearing particles with nice 'blend in / different color / different size' effects. At the end, particles are maybe faster.. and definitely nicer.   ;This might be what you're looking for.   ;Quote:Original post by Dushochanging pixels in black texture to simulate stars seems kind of old.. C approach.In C#/XNA I would use randomly appearing particles with nice 'blend in / different color / different size' effects. At the end, particles are maybe faster.. and definitely nicer.I wouldn't call it the C approach. You can use C to work with Direct3D, at least in the past you could. Not sure about not.Yes, the method you mention is better. Render some quads on screen at the position you want is much better than updating a texture.   