RendererPlatform
Summary
Remarks
Danger
All calls made within this class MUST be performed on the Master Thread. See Threads.RunLater on how to safely call this from an asynchronous thread. Failure to comply with this can cause catastrophical failures as the engine is not designed for this.
Definition
Namespace: SDT4.Managed.Renderer
Assembly: SDT4.Managed.Renderer.dll
sealed class RendererPlatform
Inheritance:
Object ➔ RendererPlatform
Implements:
IRenderingCapability, ICapability
Fields
| Name | Type | Description |
|---|---|---|
Properties
| Name | Type | Description |
|---|---|---|
public get; BackendInfo |
RendererBackendInfo |
Methods
public RenderCanvas CreateWindowRenderCanvas(Window window, DisplaySyncMode syncMode, Int32 bufferCount)
Summary: Creates a new render canvas associated with the window
Remarks:
Warning
If window already has a RenderCanvas, it is invalidated!
Parameters:
-
window(Window): The window to create a render canvas out of. -
syncMode(DisplaySyncMode): The vertical synchronisation policy of this window render canvas. -
bufferCount(Int32): How many swap chain back buffers to create. This parameter is a hint and may be
Returns:
public SceneRenderInstance CreateSceneRenderer(Scene scene)
Summary: Creates a new render instance that allows rendering the scene. Only ONE is allowed be created per scene.
Remarks:
If scene already has a scene render instance, an InvalidOperationException is thrown.
Parameters:
scene(Scene): Scene to base the render instance
Returns:
- SceneRenderInstance: A new render instance for the scene.
public MaterialInstance? CreateMaterialInstance(MaterialAsset material)
Summary: Creates a material instance
Parameters:
material(MaterialAsset): Material to create an instance out of
Returns:
- MaterialInstance?: A new material instance based on
material. If the renderer failed to allocate an instance, it will return null.