コード例 #1
0
 public virtual BaseBatch PopBatch(BaseBatch oldBatch)
 {
     if (isClosed)
     {
         return(null);
     }
     if (oldBatch != null)
     {
         batch.End();
         batch = BeginBatch(oldBatch);
         Restore();
     }
     return(batch);
 }
コード例 #2
0
        public virtual BaseBatch PushBatch(BaseBatch b)
        {
            if (isClosed)
            {
                return(null);
            }
            if (b == null)
            {
                return(null);
            }
            BaseBatch oldBatch = batch;

            Save();
            batch.End();
            batch = BeginBatch(b);
            return(oldBatch);
        }
コード例 #3
0
 public GLEx(Graphics gfx, RenderTarget target, BaseBatch def, bool alltex, bool saveFrameBuffer)
 {
     this.gfx    = gfx;
     this.target = target;
     this.batch  = def;
     this.affineStack.Add(lastTrans = new Affine2f());
     this.colorTex = gfx.FinalColorTex();
     if (target != null)
     {
         this.Scale(scaleX = target.Xscale(), scaleY = target.Yscale());
     }
     else
     {
         this.Scale(scaleX = LSystem.GetScaleWidth(), scaleY = LSystem.GetScaleHeight());
     }
     this.lastBrush             = new BrushSave();
     this.lastBrush.font        = LSystem.GetSystemGameFont();
     this.lastBrush.alltextures = alltex;
     this.lastBrush.pixSkip     = LSystem.IsHTML5() ? def_skip_html5 : def_skip;
     this.lastBrush.blend       = BlendMethod.MODE_NORMAL;
     this.brushStack.Add(lastBrush);
     this.saveToFrameBufferTexture = saveFrameBuffer;
     this.Update();
 }
コード例 #4
0
 private BaseBatch BeginBatch(BaseBatch batch)
 {
     batch.Begin(target.Width(), target.Height(), target.Flip());
     return(batch);
 }
コード例 #5
0
 public abstract void AddToBatch(BaseBatch batch, uint tint, Affine2f tx, float dx, float dy, float dw, float dh, float sx, float sy, float sw, float sh);
コード例 #6
0
 public abstract void AddToBatch(BaseBatch batch, uint tint, Affine2f tx, float x, float y, float width, float height);