public void Flush() { if (nv > 0) { shader.Render(() => { var vb = renderer.GetTempVertexBuffer(); vb.SetData(vertices, nv); renderer.DrawBatch(vb, 0, nv, PrimitiveType.QuadList); }); nv = 0; } }
public void Flush() { if (nv > 0) { shader.Render(() => { var vb = renderer.GetTempVertexBuffer(); vb.SetData(vertices, nv); renderer.SetLineWidth(LineWidth * Game.viewport.Zoom); renderer.DrawBatch(vb, 0, nv, PrimitiveType.LineList); }); nv = 0; } }
public void Flush() { if (nv > 0) { shader.SetTexture("DiffuseTexture", currentSheet.Texture); shader.Render(() => { var vb = renderer.GetTempVertexBuffer(); vb.SetData(vertices, nv); renderer.DrawBatch(vb, 0, nv, PrimitiveType.QuadList); }); nv = 0; currentSheet = null; } }
public void Flush() { if (nv > 0) { renderer.Device.SetBlendMode(BlendMode.Alpha); shader.Render(() => { var vb = renderer.GetTempVertexBuffer(); vb.SetData(vertices, nv); renderer.SetLineWidth(LineWidth); renderer.DrawBatch(vb, 0, nv, PrimitiveType.LineList); }); renderer.Device.SetBlendMode(BlendMode.None); nv = 0; } }