Exemple #1
0
        private void addParam(string key, object obj)
        {
            switch (obj.GetType().Name)
            {
            case "Vec4":
                parameters[key] = new Vec4();
                break;

            case "Sampler2D":
                parameters[key] = new Sampler2D();
                break;

            case "Float":
                parameters[key] = new Float();
                break;

            case "Int":
                parameters[key] = new Int();
                break;
            }
        }
Exemple #2
0
 private void addParam(string key, object obj)
 {
     switch (obj.GetType().Name)
     {
         case "Vec4":
             parameters[key] = new Vec4();
             break;
         case "Sampler2D":
             parameters[key] = new Sampler2D();
             break;
         case "Float":
             parameters[key] = new Float();
             break;
         case "Int":
             parameters[key] = new Int();
             break;
     }
 }
Exemple #3
0
 public void pass(string name, Vec4 vec)
 {
     int l = GL.GetUniformLocation(program, name);
     GL.Uniform4(l, vec.x, vec.y, vec.z, vec.w);
     l = 0;
 }