RenderContextBase.SetShader Method

Sets the shader as current.
Public Overridable Function SetShader( _ 
ByVal type As shaderType, _ 
Optional ByVal shaderParams As ShaderParameters = null, _ 
Optional ByVal force As Boolean = false _ 
) As Boolean
This language is not supported or no code example is available.
public virtual bool SetShader( 
shaderType type
ShaderParameters shaderParams = null, 
bool force = false 
)
This language is not supported or no code example is available.

Parameters

type
shaderType

The shader type to set

shaderParams
ShaderParameters

The shader parameters (used only in case the shader is compiled for the first time)

force
bool

If true sets the shader regardless of the current one, else sets it only if it's different from the current one.

Return Value

bool

True if the operation is successful, false otherwise

.NET Framework

Supported in: 4.8

In this article

Definition