Shawn Hargreaves:Rendertargets don't have to be the same size as the screen or backbuffer. You can make them any size up to the max supported by your graphics cards (typically 2048, although some cards can go higher).
Thanks for the speedy reply Shawn.
When I execute this code
| RenderTarget2D target = new RenderTarget2D(GraphicsDevice, 600,(int) (600 / GraphicsDevice.Viewport.AspectRatio), 1, GraphicsDevice.PresentationParameters.BackBufferFormat); |
| |
| GraphicsDevice.SetRenderTarget(0, target); |
| |
| GraphicsDevice.Clear(Microsoft.Xna.Framework.Graphics.Color.White); |
| |
I get an exception on the call to Clear saying "All active render targets must be the same size with the same multisample type." Given your reply, I'm obviously doing something wrong in setting up the render target. Can you spot what it is?