public virtual BaseBatch PopBatch(BaseBatch oldBatch) { if (isClosed) { return(null); } if (oldBatch != null) { batch.End(); batch = BeginBatch(oldBatch); Restore(); } return(batch); }
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); }
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(); }
private BaseBatch BeginBatch(BaseBatch batch) { batch.Begin(target.Width(), target.Height(), target.Flip()); return(batch); }
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);
public abstract void AddToBatch(BaseBatch batch, uint tint, Affine2f tx, float x, float y, float width, float height);