Class DX12Shader
This class represents a native instance of a DirectX shader.
Inherited Members
Namespace: Evergine.DirectX12
Assembly: Evergine.DirectX12.dll
Syntax
public class DX12Shader : Shader
Constructors
DX12Shader(GraphicsContext, ref ShaderDescription)
Initializes a new instance of the DX12Shader class.
Declaration
public DX12Shader(GraphicsContext context, ref ShaderDescription description)
Parameters
Type | Name | Description |
---|---|---|
GraphicsContext | context | The graphics context. |
ShaderDescription | description | The shader description. |
Fields
NativeShader
The DirectX 12 shader.
Declaration
public readonly ShaderBytecode NativeShader
Field Value
Type | Description |
---|---|
ShaderBytecode |
Properties
Name
Gets or sets a string identifying this instance. Can be used in graphics debugger 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 |
---|---|
nint |
Overrides
Methods
Dispose()
Performs application-defined tasks associated with freeing, releasing, or resetting unmanaged resources.
Declaration
public override void Dispose()
Overrides
ShaderCompile(GraphicsContext, string, string, ShaderStages, CompilerParameters)
Converts the shader source into byte code.
Declaration
public static CompilationResult ShaderCompile(GraphicsContext context, string shaderSource, string entryPoint, ShaderStages stage, CompilerParameters parameters)
Parameters
Type | Name | Description |
---|---|---|
GraphicsContext | context | The graphics context. |
string | shaderSource | The shader source text. |
string | entryPoint | The entry point function name. |
ShaderStages | stage | The shader stage, ShaderStages. |
CompilerParameters | parameters | The compiler parameters. |
Returns
Type | Description |
---|---|
CompilationResult | The shader byte code. |