Class NoOpPluginRenderRegistry
- Namespace
- AcDream.Plugin.Abstractions
- Assembly
- AcDream.Plugin.Abstractions.dll
Headless renderer implementation.
public sealed class NoOpPluginRenderRegistry : IPluginRenderRegistry
- Inheritance
-
NoOpPluginRenderRegistry
- Implements
- Inherited Members
Remarks
Accepts every call and draws nothing, so a plugin with an overlay runs unchanged where nothing is drawn.
Properties
Instance
The one shared instance.
public static NoOpPluginRenderRegistry Instance { get; }
Property Value
Methods
AddHud(PluginHudDescriptor)
Adds an overlay. Dispose the returned registration to remove it.
public IPluginHudRegistration AddHud(PluginHudDescriptor descriptor)
Parameters
descriptorPluginHudDescriptorThe overlay's name, title and starting placement.
Returns
- IPluginHudRegistration
The handle the plugin shows, moves and draws the overlay through.
LoadTexture(string)
Loads an image for drawing.
public IPluginTexture? LoadTexture(string resourceId)
Parameters
resourceIdstringThe id of an image among the plugin's resources.
Returns
- IPluginTexture
The texture, or null when the host has no renderer or the resource is not an image it can load.