   Question about drawprimitive
  I now know how to draw primitives, drawing a square or a cube using vertices and indices and texturing them.  I have used a IDirect3DTexture9 to write in a crosshair to my application however i cant figure out how to use a second set of vertex buffers and index buffers to write in the code for a floor or wall type object as well as my crosshair, which would be a seperate object, do i need to do anything special to have a second vertex buffer, or is it even possible or would there be a better solution to my problem than using a second vertex buffer?   
  The process of creating a second Vertex Buffer is exactly the same as creating the first one:1) Call CreateVertexBuffer (exact name depends on the language).2) Lock it, fill it with data, unlock it.Now, drawing a scene when you have 2 objects would go something like this:1) Call SetStreamSource with VB1.2) Call SetFVF/SetDeclaration, and any other settings you need for drawing.3) Call Draw*Primitive() for the first vertex buffer.4) Call SetStreamSource with VB2.5) Call SetFVF/SetDeclaration, and any other settings you need to change.6) Call Draw*Primitive() for the second vertex buffer.7) EndScene() and Present().Hope this helps :).[EDIT] Almost forgot, you are not limited in the number of VBs you use, though switching between them (the SetStreamSource call) is a costly operation, and should be minimized :).   ;  thanks a lot for the reply and looking however i have another problem now, thats that my program works ok but for some reason draws the contents of the two vertex buffers in the exact same place and there both the exact same size also eventually i want to expand the floor im creating into a building, interior and expand the floor to the exterior, is there a better or quicker method of programming this other than using a vertex and index buffer?;  Are you using and setting the world transformations matrices?   ;  No, i wasn't i just assumed that the co-ords i plugged into the vertex buffers would be relative to the origin so if i put in 0, -2, 0 for the floor it would load at 4 below the crosshair which is loaded 0, 2, 0   ;Quote:Original post by LordFalloutNo, i wasn't i just assumed that the co-ords i plugged into the vertex buffers would be relative to the origin so if i put in 0, -2, 0 for the floor it would load at 4 below the crosshair which is loaded 0, 2, 0The co-ords in the vertex buffers are probably relative to the model's origin.  You need to apply your transformations to a world matrix, then call SetTransform(D3DTS_WORLD,&world_matrix)   ;  Thats something i've been confused about a lot in the past, thanks for clearing that up for me, i'll do some further reading, by the way its working fine now :)   ;Quote:Original post by LordFalloutThats something i've been confused about a lot in the past, thanks for clearing that up for me, i'll do some further reading, by the way its working fine now :)Anytime   