Example #1
0
 internal ShaderParameter(string name)
 {
     this.Uniform = GraphicsContext.CreateUniform(name, UniformType.Vec4, 4);
 }
Example #2
0
 public static void SetUniform(UniformHandle uniform, ref Vec4 value)
 {
     Bgfx.set_uniform(uniform, Unsafe.AsPointer(ref value), 1);
 }
Example #3
0
 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);
 }
Example #4
0
        /* SHADERS */
        /* ==================================================================*/

        public static void SetUniform(UniformHandle uniform, float value)
        {
            Bgfx.set_uniform(uniform, &value, 1);
        }
Example #5
0
 public static void DestroyUniform(UniformHandle uniform)
 {
     Bgfx.destroy_uniform(uniform);
 }