title: C# DirectX Draw lines using DrawUserPrimitives works fine but DrawPrimitives don't work
body: <p>I've got problem with DirectX in C#. I want to draw some lines. Firstly I've done it with DrawUserPrimitives and all is fine. But then I switched to vertexBuffer because I want to make rotations and other camera action. And I can't see nothing in the window.</p>
  
  <p>There is part of code that fills vertexBuffer and draw verts on a plane.</p>
  
  <pre><code>vertexBuffer = new VertexBuffer(typeof(CustomVertex.PositionColored), 
     8 * (CurrentPanel.ElementsCount() + 1), m_device, Usage.None,
     CustomVertex.PositionColored.Format, Pool.Default);
  CustomVertex.PositionColored[] verts =
     (CustomVertex.PositionColored[])vertexBuffer.Lock(0, 0);
  //this function returns array of verts based on given points.
  verts = CurrentPanel.GetLines(); 
  vertexBuffer.Unlock();
  m_device.Clear(ClearFlags.Target, System.Drawing.Color.FromArgb(255, 255, 255).ToArgb(), 1.0f, 0);
  m_device.BeginScene(); //m_device is my DirectX.Device
  SetupViewport(); //Set all of matrixes...
  m_device.SetStreamSource(0, vertexBuffer, 0);
  m_device.VertexFormat = CustomVertex.PositionColored.Format;
  //m_device.DrawUserPrimitives(PrimitiveType.LineList, CurrentPanel.ElementsCount() * 4, verts); // &lt;- WHEN I USE THIS ALL IS OK
  m_device.DrawPrimitives(PrimitiveType.LineList, 0, 4*(CurrentPanel.ElementsCount()+1)); //&lt;-DO NOT WORK
  m_device.EndScene();
  m_device.Present(); 
  </code></pre>
  
  <p>I would like to add that this code is based on Microsoft DirectX samples.</p>