Jump to content
  • Advertisement
Sign in to follow this  
PDX_Catalyst

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

This topic is 4025 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

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!

Share this post


Link to post
Share on other sites
Advertisement
Solution:

NOTE: SIZE_P == 2048

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

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!