public void SubmitGeometryItem(GeometryItem item)
 {
     if (this._geometryBatch.Contains(item))
     {
         return;
     }
     this._geometryBatch.Add(item);
 }
 public override void Update()
 {
     Layer.lighting = true;
     if (this._initialized)
     {
         return;
     }
     this._geo = MTSpriteBatch.CreateGeometryItem();
     this.DrawLight();
     this._initialized = true;
 }
        public GeometryItem GetGeometryItem()
        {
            GeometryItem geometryItem;

            if (this._freeGeometryBatch.Count > 0)
            {
                geometryItem          = this._freeGeometryBatch.Dequeue();
                geometryItem.material = (Material)null;
            }
            else
            {
                geometryItem = new GeometryItem()
                {
                    temporary = true
                }
            };
            geometryItem.Clear();
            return(geometryItem);
        }
Beispiel #4
0
 public void SubmitGeometry(GeometryItem geo) => this._batcher.SubmitGeometryItem(geo);
 private static int CompareGeometryReverseDepth(GeometryItem a, GeometryItem b) => b.depth.CompareTo(a.depth);
 private static int CompareGeometryDepth(GeometryItem a, GeometryItem b) => a.depth.CompareTo(b.depth);