internal ShaderParameter(string name) { this.Uniform = GraphicsContext.CreateUniform(name, UniformType.Vec4, 4); }
public static void SetUniform(UniformHandle uniform, ref Vec4 value) { Bgfx.set_uniform(uniform, Unsafe.AsPointer(ref value), 1); }
public static void SetTexture(byte tex_stage, UniformHandle sampler_uniform, TextureHandle texture, TextureFlags flags = (TextureFlags)uint.MaxValue) { Bgfx.set_texture(tex_stage, sampler_uniform, texture, (uint)flags); }
/* SHADERS */ /* ==================================================================*/ public static void SetUniform(UniformHandle uniform, float value) { Bgfx.set_uniform(uniform, &value, 1); }
public static void DestroyUniform(UniformHandle uniform) { Bgfx.destroy_uniform(uniform); }