Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6208309
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T05:47:13+00:00 2026-05-24T05:47:13+00:00

I understand that Render Targets in XNA are volatile, but how volatile are they?

  • 0

I understand that Render Targets in XNA are volatile, but how volatile are they? I can’t find any documentation that tells when exactly their contents are discarded. Is it just when you start drawing to them, or could it be at any time?

I would like to simply draw to a render target once and then use it as a Texture2D indefinitely. Is this possible? Would I need to enable RenderTargetUsage.PreserveContents for this to work properly? I have read that PreserveContents is very slow on Xbox and phone hardware.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T05:47:14+00:00Added an answer on May 24, 2026 at 5:47 am

    Jonathan has given a great explanation of RenderTargetUsage, but I’d like to clarify some things with regard to the original question, involving the use of a RenderTarget2D as a Texture2D:

    Put simply, RenderTargetUsage controls the behaviour of the surface when it is set on the device as a render target. If it is not set to preserve the contents, they will be cleared. On Xbox 360 this happens as a quirk of the hardware (for performance). On Windows this is emulated to match Xbox 360 by simply clearing the surface when you set it.

    But, if you are using it as a texture, this is irrelevant. It’s only an issue when you want to render to the one surface multiple times (setting it to the device each time) without losing the previous contents.

    If you only set it as the render target once, at the start of your game, it won’t matter what the preserve setting is because it never gets set as a render target again.

    What you do care about is the IsContentLost property (MSDN) or the ContentLost event (MSDN). These will be set/raised if the contents that you rendered to the render target were lost (due to device changes, eg: going full-screen).

    If you’re re-rendering the render target each frame, then you don’t need to check for content-lost. But if you expect to create your render targets at the start of your game and continue using them throughout, you need to ensure they haven’t been lost after the frame on which they were created.

    (Note that you don’t need to worry about content-lost happening part-way through your Draw call. I’m reasonably certain that it can only ever happen between frames.)

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I understand that partial views are used to render parts of a view. But
My understand of Control Adapters is that they're designed to allow different HTML rendering
I understand that to use custom fonts in a widget I need to render
Following on from this question, I understand that Visual Studio 2008 doesn't accurately render
I understand that different browsers are likely to have different ceiling values, but what
I understand that Web Site Projects compile source on-the-fly, and Web Application Projects pre-compile
I understand that CoCreateInstance finds the COM server for the given class id, creates
I understand that in MVVM: the View knows about the ViewModel the ViewModel knows
I understand that we need to create MXML file to define a view. Suppose
I understand that when adding a column to a table containing data in SQL

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.