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

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