The ColorTarget
property of the RenderTarget
class represents the color texture that is used as the target for rendering operations. This texture is where the color output of rendering is stored.
The ColorTarget
property of the RenderTarget
class represents the color texture that is used as the target for rendering operations. This texture is where the color output of rendering is stored.
To access the color texture of a RenderTarget
, use the ColorTarget
property. This property is read-only and provides a Texture
object that can be used in rendering operations or for further processing.
// Example of accessing the ColorTarget property RenderTarget renderTarget = RenderTarget.GetTemporary(1024, 768, ImageFormat.RGBA8, ImageFormat.Depth24, MultisampleAmount.None, 1); Texture colorTexture = renderTarget.ColorTarget; // Use the colorTexture for further operations // ... // Dispose of the render target when done renderTarget.Dispose();