Exemplo n.º 1
0
 public ShaderUniformPackage(ShaderUniformPackage ShaderUniformPackage)
 {
     this._Size = new List <int>(ShaderUniformPackage._Size);
     this._ID   = new List <string>(ShaderUniformPackage._ID);
     this._Type = new List <string>(ShaderUniformPackage._Type);
     this._Data = new List <byte[]>(ShaderUniformPackage._Data);
 }
Exemplo n.º 2
0
 public ShaderRenderer() : base()
 {
     this._PushedID = "";
     this._Globals  = new ShaderUniformPackage();
     this._GridSize = -1;
     _Globals.SetDefinition("CameraPosition", 3 * sizeof(float), "vec3");
     _Globals.SetDefinition("Projection", 16 * sizeof(float), "mat4");
     _Globals.SetDefinition("ModelView", 16 * sizeof(float), "mat4");
 }
Exemplo n.º 3
0
 public virtual void Update(ShaderUniformPackage ShaderUniformPackage)
 {
     for (int i = 0; i < ShaderUniformPackage._ID.Count; i++)
     {
         if (this.Exists(ShaderUniformPackage._ID[i]))
         {
             this.SetData(ShaderUniformPackage._ID[i], ShaderUniformPackage._Data[i]);
         }
         else
         {
             this.SetDefinition(ShaderUniformPackage._ID[i], ShaderUniformPackage._Size[i], ShaderUniformPackage._Type[i]);
             this.SetData(ShaderUniformPackage._ID[i], ShaderUniformPackage._Data[i]);
         }
     }
 }