[.net] RenderTarget2D - Can't be larger than the screen?

Started by
0 comments, last by PDX_Catalyst 16 years, 9 months ago
I'm rendering terrain using (or trying to) one giant 2048 x 2048 texture which I'm creating using RenderTarget2D. The problem is, I can't do this... rt = new RenderTarget2D(device, 2048, 2048, 1, SurfaceFormat.Color); ... or I get an empty texture. It took me a while to figure out that the dimensions had to be no larger than these... graphics.PreferredBackBufferHeight = ScreenHeight; graphics.PreferredBackBufferWidth = ScreenWidth; Once I lowered the dimensions of the RenderTarget2D I got a texture just fine. Why is that? And isn't there some way I can create a larger texture? Thanks in advance for any help!
Advertisement
Solution:

NOTE: SIZE_P == 2048

device.DepthStencilBuffer = new DepthStencilBuffer(device, SIZE_P, SIZE_P, device.PresentationParameters.AutoDepthStencilFormat, device.PresentationParameters.MultiSampleType, device.PresentationParameters.MultiSampleQuality);

This topic is closed to new replies.

Advertisement