Пример #1
0
 public void CreateUI(GLEx g)
 {
     if (visible)
     {
         if (dirty)
         {
             tex2ds.Clear();
             for (int i = 0; i < count; i++)
             {
                 texture = kernels[i].Get();
                 if (!tex2ds.Contains(texture))
                 {
                     tex2ds.Add(texture);
                     texture.GLBegin();
                 }
                 kernels[i].Draw(g);
             }
             for (int i = 0; i < tex2ds.Count; i++)
             {
                 texture = tex2ds[i];
                 texture.NewBatchCache(true);
                 texture.PostLastBatchCache();
             }
             dirty = false;
         }
         else
         {
             for (int i = 0; i < tex2ds.Count; i++)
             {
                 texture = tex2ds[i];
                 texture.PostLastBatchCache();
             }
         }
     }
 }