   simple way to draw lines
  is there a simple way to draw lines in DX?previously ive programmed in opengl and there it was rly easy...begin line   set color   verticesend linebut for DX as far as ive understood u have to store each line in a vertexbuffer set and then draw it and then release the buffer.. which seems overly complicated and time wasting when u just want to draw some lines for debugging and such... there gotta be a simplier way?   
  IDirect3DDevice::DrawPrimitiveUP() is probably what you want. It's still not quite as simple as OpenGL though, since you need to compose an array of your vertices and then draw them as a line strip or line list.   ;  hmmm... cant find any examples on google...could u show me a simple example on how to use it?EDIT:: nvm... found the def on msdn   ;  This is completely off the top of my head, so it may or may not work...struct Vertex{   Vertex(D3DXVECTOR3 pos, D3DCOLOR color) : vPos(pos), rhw(0.5f), dwColor(color) {}   D3DXVECTOR3 vPos;   float rhw;   D3DCOLOR dwColor;};#define FVF_DEBUGLINE (D3DFVF_XYZRHW | D3DFVF_DIFFUSE)// Tell D3D to expect out format of verticespDevice->SetFVF(FVF_DEBUGLINE);// Make a buffer of some verticesVertex verts[] ={   Vertex(D3DXVECTOR3(0, 0, 0), 0xffff0000),   // Red vertex at (0, 0)   Vertex(D3DXVECTOR3(10, 20, 0), 0xff00ff00), // Green vertex at (10, 20)   Vertex(D3DXVECTOR3(20, 10, 0), 0xff0000ff)  // Blue vertex at (20, 10)};// Draw the lines as a line list (joined up list of vertices)// 2nd parameter is number of linespDevice->DrawPrimitiveUP(D3DPT_LINELIST, 2, verts, sizeof(Vertex);Obviously that needs called between a BeginScene()..EndScene() pair.   ;  Also, my sample demonstrating rasterization state for Chapter 10 Rasterization and Shading from my book draws some lines to show the difference between enabling and disabling RS_LASTPIXEL and other state that affects rasterization of line primitives.   