I've been dabbling with XNA for a couple of days now. This chunk of code doesn't work as I expect. The goal is to render sprites individually and composite them on another rendertarget.

P = RenderTarget2D(with RenderTargetUsage.PreserveContents)
D = RenderTarget2D(with RenderTargetUsage.DiscardContents)

for all sprites:
{
    graphicsDevice.SetRenderTarget(D);
    &lt;draw sprite i&gt;

    graphicsDevice.SetRenderTarget(P);
    &lt;Draw D&gt;
}

graphicsDevice.SetRenderTarget(null);
&lt;Draw P&gt;


The result I get is - only the last sprite is visible. I'm sure I'm missing some piece of information about RenderTarget2D. Any hints on what that might be?


Question: What happens to light and mass in the center of a black hole?
Answer: One theory suggests that all the matter is squashed to a tiny point where its density is so incredibly that it literally rips a hole in the spacetime. This hole creates a loop to possibly another location in the universe in any time or even in a parallel universe. This matter is sucked through the black hole to the other side of the loop hole where something called a white hole is created. There is little evidence for this as no white holes have ever been found.