[]
Common Shader class. Provides a common set of methods for a Shader Stage. TODO: check if usage of abstract is not introducing an unacceptable overhead...
public abstract class CommonShaderStage<T> : CommonShaderStageBase, IDisposable where T : DeviceChild
T
Type of the shader
Initializes a new instance of the CommonShaderStage<T> class.
protected CommonShaderStage(IntPtr pointer)
pointer
System.IntPtrThe pointer.
Gets the shader currently assigned to the device.
public T Get()
The shader (null if no shader is assigned).
Gets the shader currently assigned to the device.
public T Get(ClassInstance[] classInstances)
classInstances
ClassInstance[]An array that will be used to contain any class instances currently active.
The shader (null if no shader is assigned).
Assigns a compute shader to the device.
public void Set(T shader, ComArray<ClassInstance> classInstances)
shader
TThe shader to assign to the device. Assign null
to disable the compute shader.
classInstances
ComArray<ClassInstance>An array of class-instance interfaces. Each interface used by a shader must have a corresponding class instance or the shader will get disabled.
Assigns a compute shader to the device.
public void Set(T shader, ClassInstance[] classInstances)
shader
TThe shader to assign to the device. Assign null
to disable the compute shader.
classInstances
ClassInstance[]An array of class-instance interfaces. Each interface used by a shader must have a corresponding class instance or the shader will get disabled.
Assigns a compute shader to the device.
public void Set(T shader)
shader
TThe shader to assign to the device. Assign null to disable the compute shader.