Table of Contents

Class ComputeProgram

Namespace
Bonsai.Shaders
Assembly
Bonsai.Shaders.dll

Provides functionality for executing and updating the state of a compute shader program.

public class ComputeProgram : Shader, IDisposable
Inheritance
ComputeProgram
Implements
Inherited Members

Properties

WorkGroups

Gets or sets a value specifying the number of workgroups to be launched when dispatching the compute shader.

public DispatchParameters WorkGroups { get; set; }

Property Value

DispatchParameters

Methods

CreateShader()

Compiles the compute shader and returns the program object handle.

protected override int CreateShader()

Returns

int

A handle to the compute shader program object.

OnDispatch()

Returns any actions that should be executed before running the shader program.

protected override Action OnDispatch()

Returns

Action

An Action object to be called before running the shader program. If the return value is null, no action will be executed.