示例#1
0
        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;
            }
        }
示例#2
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;
            }
        }
示例#3
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;
            }
        }
示例#4
0
 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;
     }
 }