Table of Contents

Class ShaderManager

Namespace
Bonsai.Shaders
Assembly
Bonsai.Shaders.dll

Provides functionality for accessing shader window resources and scheduling actions on the main render loop.

public static class ShaderManager
Inheritance
ShaderManager
Inherited Members

Properties

WindowSource

Gets an observable sequence containing the active shader window.

public static IObservable<ShaderWindow> WindowSource { get; }

Property Value

IObservable<ShaderWindow>

Methods

ReserveComputeProgram(string)

Returns an observable sequence that retrieves the compute shader with the specified name.

public static IObservable<ComputeProgram> ReserveComputeProgram(string shaderName)

Parameters

shaderName string

The name of the shader program to retrieve.

Returns

IObservable<ComputeProgram>

A sequence containing a single instance of the ComputeProgram class matching the specified shader name; or an exception, if no such shader exists.

ReserveMaterial(string)

Returns an observable sequence that retrieves the material shader with the specified name.

public static IObservable<Material> ReserveMaterial(string shaderName)

Parameters

shaderName string

The name of the shader program to retrieve.

Returns

IObservable<Material>

A sequence containing a single instance of the Material class matching the specified shader name; or an exception, if no such shader exists.

ReserveShader(string)

Returns an observable sequence that retrieves the shader with the specified name.

public static IObservable<Shader> ReserveShader(string shaderName)

Parameters

shaderName string

The name of the shader program to retrieve.

Returns

IObservable<Shader>

A sequence containing a single instance of the Shader class matching the specified name; or an exception, if no such shader exists.

WindowUpdate(Action<ShaderWindow>)

Invokes an action on the next update of the active shader window and returns the window instance through an observable sequence.

public static IObservable<ShaderWindow> WindowUpdate(Action<ShaderWindow> update)

Parameters

update Action<ShaderWindow>

The action to invoke on the next update of the active shader window.

Returns

IObservable<ShaderWindow>

An observable sequence returning the active ShaderWindow instance immediately after the action has been invoked.