GlShaderException class Core

A shader failed to compile or a program failed to link. Carries the driver's info log verbatim plus the resource name the log's line numbers belong to, because the one thing a GLSL error message never says is WHICH of the sources it is talking about.

public sealed class GlShaderException : Exception
Namespace
ArionUI.Gpu
Package
ArionUI.Gpu · dotnet add package ArionUI.Gpu --prerelease
Inherits
Exception

Constructors

GlShaderException

public GlShaderException(string resourceName, string infoLog, string stage);

Properties

InfoLog

public string InfoLog { get; }

The driver's log, unchanged.

ResourceName

public string ResourceName { get; }

The embedded resource (or logical name) the failing source came from.

Stage

public string Stage { get; }

"Compile" or "Link".

Methods

Locate

public static string Locate(string resourceName, string infoLog);

Rewrites the driver's 0(17) : error / ERROR: 0:17: line references to <resource>(17), so the log names the FILE the line is in.

Both spellings occur in the wild: ANGLE's HLSL translator emits the first, desktop Mesa the second. Anything it does not recognise is passed through unchanged rather than dropped: a log we cannot parse is still the only information there is.