// Generated API outline. Implementation bodies omitted. #nullable enable using System.Collections.Generic; using System.ComponentModel; using System.Diagnostics; using System.IO; using System.Linq; using System.Net.Http; using System.Threading.Tasks; using System.Threading; using System; using nfloat = System.Runtime.InteropServices.NFloat; using static Xui.Core.Math2D.Constants; namespace Xui.GPU.Backends.Glsl { using System.Globalization; using System.Text; using Xui.GPU.IR; /// Emits GLSL ES 3.00 for WebGL 2 from the shared shader IR. /// /// Define XUI_VERTEX or XUI_FRAGMENT immediately after the version line when compiling /// a stage. Both stages use main. Bind XuiBindings as a std140 uniform block; matrices /// are row-major in that buffer, matching Xui's CPU matrices. Vertex clip depth is /// converted from Xui's [0,w] convention to OpenGL's [-w,w]. Texture/sampler pairs /// become combined sampler uniforms named x_texture_TextureField_SamplerField. /// Unsupported IR fails explicitly; this backend does not provide a GPU device. /// public sealed class GlslCodeGenerator : IShaderBackend { /// Gets the source-generator backend selector. public string Name { get; } /// Generates a source bundle containing both compile-time-selected stages. public string GenerateCode(IrShaderModule module); } }