   [DirectX9 C++] - Lines in 3D stored in a mesh
  Good day,I need to create some 3d lines in my scene and tried a few things out.If it is possible i would like to store each of those lines in a mesh.1st try: Method - Draw a ID3DXLine and transform it by the view and projection matrices so it becomes 3d-like. Result - FAIL.Reason - When moving camera around, line seems to change direction...2nd try:Method - Create a D3DXCreateCylinder()/Box with a thickness of 0.1f.Result - FAIL.Reason - This actually worked but if the camera moves away, the "line" appears dotted and some melds in the background.If not for this problem, it would be a perfect solution because it actually creates a mesh.3rd try:Method - Fill a vertex and an index buffer with the line info and DrawIndexedPrimitive().Result - 50% achieved.Reason - Ok. As expected this basic solution always works, but i there is no mesh created.I have read that in D3D10 there is a way to set the topology to D3D10_PRIMITIVE_TOPOLOGY_LINELIST, so when a mesh is created it draws lines instead of triangles. It would be great if there was something similar in D3D9...Any suggestions on the matter?A better approach than the methods above?   
  Look into D3DPRIMITIVETYPE::D3DPT_LINESTRIP or D3DPRIMITIVETYPE::D3DPT_LINELIST.   ;Quote:Original post by superpigLook into D3DPRIMITIVETYPE::D3DPT_LINESTRIP or D3DPRIMITIVETYPE::D3DPT_LINELIST.But he wants to make a mesh from the lines, can you set a mesh to be rendered like LINESTRIP or LINELIST?stakon - Why actually do you want (need?) it to be a mesh?   ;  The real reason i want my lines to be stored in meshes, is code uniformity.This means that all 3D objects created so far are stored in meshes and it would be good to preserve this. This way the functions that are handling mesh objects can stay unchanged.Of course if there is no way around this, i guess i'll go for the DrawIndexedPrimitive() method and recreate those functions mentioned above.