Skip to content

GraphicsAPI reference

Struct ShaderCode

Namespace: MicroEngine.Graphics.Devices
Assembly: MicroEngine.Graphics.dll
Guide: The graphics device

Bytecode (or MSL source) of one shader in one format, with its entry point.

C#
public readonly struct ShaderCode : IEquatable<ShaderCode>

Implements

IEquatable<ShaderCode>

Constructors

ShaderCode(ReadOnlyMemory<byte>, string)

Bytecode (or MSL source) of one shader in one format, with its entry point.

C#
public ShaderCode(ReadOnlyMemory<byte> Bytes, string EntryPoint)

Parameters

Bytes ReadOnlyMemory<byte>

The code as Code takes it.

EntryPoint string

Entry point name (“main”; “main0” for MSL generated by SPIRV-Cross).

Properties

Bytes

The code as Code takes it.

C#
public ReadOnlyMemory<byte> Bytes { get; init; }

Property Value

ReadOnlyMemory<byte>

EntryPoint

Entry point name (“main”; “main0” for MSL generated by SPIRV-Cross).

C#
public string EntryPoint { get; init; }

Property Value

string

Methods

Deconstruct(out ReadOnlyMemory<byte>, out string)

C#
public void Deconstruct(out ReadOnlyMemory<byte> Bytes, out string EntryPoint)

Parameters

Bytes ReadOnlyMemory<byte>

EntryPoint string

Equals(object)

C#
public override bool Equals(object obj)

Parameters

obj object

Returns

bool

Equals(ShaderCode)

C#
public bool Equals(ShaderCode other)

Parameters

other ShaderCode

Returns

bool

GetHashCode()

C#
public override int GetHashCode()

Returns

int

ToString()

C#
public override string ToString()

Returns

string

Operators

operator ==(ShaderCode, ShaderCode)

C#
public static bool operator ==(ShaderCode left, ShaderCode right)

Parameters

left ShaderCode

right ShaderCode

Returns

bool

operator !=(ShaderCode, ShaderCode)

C#
public static bool operator !=(ShaderCode left, ShaderCode right)

Parameters

left ShaderCode

right ShaderCode

Returns

bool