# RenderTarget2D

RenderTarget2D instances can be created in the FRB Editor. When created in the FRB editor, they have the following behavior:

* They will automatically match the resolution of the screen
* They will be cleaned up when the Screen is destroyed

For an example on using RenderTarget2Ds with FlatRedBall Layers, see the [Layer RenderTarget](/flatredball/api/flatredball/graphics/layer/rendertarget.md) page.


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.flatredball.com/flatredball/glue-reference/objects/object-types/rendertarget2d.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
