Class MTLShader
This class represents a native shader object on Metal.
Implements
Inherited Members
Namespace: Evergine.Metal
Assembly: Evergine.Metal.dll
Syntax
public class MTLShader : Shader, IDisposable
  Constructors
MTLShader(GraphicsContext, ref ShaderDescription)
Initializes a new instance of the MTLShader class.
Declaration
public MTLShader(GraphicsContext context, ref ShaderDescription description)
  Parameters
| Type | Name | Description | 
|---|---|---|
| GraphicsContext | context | The graphics context.  | 
      
| ShaderDescription | description | The shader description.  | 
      
Fields
Function
The public shader function in the library.
Declaration
public IMTLFunction Function
  Field Value
| Type | Description | 
|---|---|
| IMTLFunction | 
Library
A collection of Metal shader functions.
Declaration
public IMTLLibrary Library
  Field Value
| Type | Description | 
|---|---|
| IMTLLibrary | 
Properties
Name
Gets or sets a string identifying this instance. Can be used in graphics debuggers tools.
Declaration
public override string Name { get; set; }
  Property Value
| Type | Description | 
|---|---|
| string | 
Overrides
NativePointer
Gets the native pointer.
Declaration
public override nint NativePointer { get; }
  Property Value
| Type | Description | 
|---|---|
| IntPtr | 
Overrides
Methods
Dispose()
Dispose this instance.
Declaration
public override void Dispose()
  Overrides
ShaderCompile(string, string, ShaderStages, CompilerParameters)
Converts the shader source into bytecode.
Declaration
public static CompilationResult ShaderCompile(string shaderSource, string entryPoint, ShaderStages stage, CompilerParameters parameters)
  Parameters
| Type | Name | Description | 
|---|---|---|
| string | shaderSource | The shader source text.  | 
      
| string | entryPoint | The entrypoint function name.  | 
      
| ShaderStages | stage | The shader stage, ShaderStages.  | 
      
| CompilerParameters | parameters | The compiler parameters.  | 
      
Returns
| Type | Description | 
|---|---|
| CompilationResult | The shader bytecodes.  |