   How to draw lines
  I am trying to draw a line list by modifying one of the tutorials in the sdk.The problem is that the lines aren't drawn. There's the code:#define D3DFVF_CUSTOMVERTEX (D3DFVF_XYZRHW|D3DFVF_DIFFUSE)struct CUSTOMVERTEX{    FLOAT x, y, z, rhw; // The transformed position for the vertex.    DWORD color;   // The vertex color.};void DrawLines(LPDIRECT3DDEVICE9 pd3dDevice, CUSTOMVERTEX vertices[], int nNumOfVertices){LPDIRECT3DVERTEXBUFFER9 pVB;pd3dDevice -> CreateVertexBuffer(sizeof(CUSTOMVERTEX) * nNumOfVertices, 0, D3DFVF_CUSTOMVERTEX, D3DPOOL_DEFAULT, &pVB, NULL);VOID* pVertices;pVB -> Lock(0, sizeof(vertices), (void**)&pVertices, 0);memcpy(pVertices, vertices, sizeof(vertices));pVB -> Unlock();pd3dDevice -> SetStreamSource(0, pVB, 0, sizeof(CUSTOMVERTEX));pd3dDevice -> SetFVF(D3DFVF_CUSTOMVERTEX);int nPrimitives = nNumOfVertices / 2;pd3dDevice -> DrawPrimitive(D3DPT_LINELIST, 0, nNumOfVertices / 2);}Any ideas?   
  What data are you passing to this function? All points should be in screen space I think.Might be worth trying this too:memcpy(pVertices, vertices, sizeof(CUSTOMVERTEX) * nNumOfVertices);   ;  This is the data i'm passing:CUSTOMVERTEX vertices[] = {{ 5.0f, 5.0f, -5.0f, 1.0f, D3DCOLOR_ARGB(200,200,0,0), }, // x, y, z, rhw, color{ -5.0f, 5.0f, 0.0f, 1.0f, D3DCOLOR_ARGB(200,200,0,0), },{ 1.0f, -5.0f, 5.0f, 1.0f, D3DCOLOR_ARGB(200,200,0,0), },{ 2.0f, 5.0f, 0.0f, 1.0f, D3DCOLOR_ARGB(200,200,0,0), },{ 5.0f, 0.0f, 0.5f, 1.0f, D3DCOLOR_ARGB(200,200,0,0), },{ 0.0f, 6.0f, 0.5f, 1.0f, D3DCOLOR_ARGB(200,200,0,0), }};DrawLines(GetDevice(), vertices, 6);I tried changing the memcpy(), it still doesn't  work altough I think you were right about that.About points being in screen space, What if I want to locate them in 3d world space?   ;  When you used XYZW Direct3D will expect all the coordinates to be already transformed and therefore are in screespace already. So in this case you 0,0 will be the top left of the screen and the windows width will be right top of the screen. what would i would susgest you to do is specify a value that is bigger than 0 or 1 for the range for each points. Hope that helps.   