OffscreenView

Description

sealed class Tinman.Engine.Scenes.Entities.OffscreenView

Derived from

SceneEntityView<ISceneView> abstract

Performs offscreen rendering.

To perform offscreen rendering, the following steps are necessary:

  1. Create a component that performs rendering, for example a ISceneView.

  2. Create a render target handle, which defines the properties of the render target that will be used for offscreen rendering. If offscreen rendering is supposed to produce transparent pixels, a render target format with an alpha channel is required (for example RenderTargetFormat.RGBA_8) and the default clear color should be transparent (see RenderTargetHandle.Color).

  3. Create an OffscreenView, passing the render component and render target handle, and add it to a scene view.

  4. Use OffscreenBitmap and OffscreenTexture to use the offscreen render results as the source for other rendering work.

Public / Constructors

Offscreen​View


public constructor OffscreenView → (4)

component in : object

[not-null]
The component to wrap.

renderTargetHandle in : RenderTargetHandle

[not-null]
The offscreen render target to use.

update opt : bool = true

Enable the IUpdateableFrameTime.UpdateFrameTime callback?

order opt : int32 = 0

See ISceneObject.Order.

Creates a new instance of OffscreenView.

The following callbacks will be performed on component in, if it implements the respective interface:

Public / Attributes

Offscreen​Bitmap


public attribute OffscreenBitmap → (get)

value : IResourceHandle

[not-null]
The IResourceHandle object.

The IResourceHandle that returns a Bitmap that represents the rendered offscreen content.

The same IResourceHandle object will be returned for the lifetime of this OffscreenView object.

Offscreen​Texture


public attribute OffscreenTexture → (get)

value : IModelTexture

[not-null]
The IModelTexture handle.

The IModelTexture that represents the rendered offscreen content.

The same IModelTexture object will be returned for the lifetime of this OffscreenView object.