示例#1
0
 public void Render(float time, Graphics.GraphicsDevice dev)
 {
     dev.SetActiveMaterial(mat);
     dev.SetVertexBuffer(vb);
     dev.SetIndexBuffer(ib);
     dev.Draw(DrawMode.Lines);
     dev.SetActiveMaterial(null);
     dev.SetVertexBuffer(null);
     dev.SetIndexBuffer(null);
 }
示例#2
0
 public virtual void Render(float time, Graphics.GraphicsDevice dev)
 {
     if (model != null && mat != null)
     {
         if (mat != null)
         {
             dev.SetActiveMaterial(mat);
         }
         dev.SetVertexBuffer(model.VertexBuffer);
         foreach (var part in model.Parts)
         {
             dev.SetIndexBuffer(part.IndexBuffer);
             dev.Draw(Graphics.DrawMode.Triangles);
         }
         dev.SetIndexBuffer(null);
         dev.SetVertexBuffer(null);
         dev.SetActiveMaterial(null);
     }
 }
示例#3
0
 public void Render(float time, Graphics.GraphicsDevice dev)
 {
     if (mat != null)
     {
         dev.SetActiveMaterial(mat);
     }
     dev.SetVertexBuffer(vb);
     foreach (var block in blocks)
     {
         RenderBlock(block, dev);
     }
     dev.SetVertexBuffer(null);
     dev.SetIndexBuffer(null);
 }