Archived

This topic is now archived and is closed to further replies.

UnknownPlayer

Drawing 2D lines using line lists

Recommended Posts

Basically I want to draw 2D lines (for targetting brackets etc.) using line lists in D3D. I''ve set up my line drawing class to use D3DFVF_XYZRHW vertices as the points I use when drawing the line, but I''m still able to use my camera to fly around the lines and have them appropriately transform for me. Do I need to set the projection or view matrices to something else to achieve this effect, or have I totally missed something? ##UnknownPlayer##

Share this post


Link to post
Share on other sites
Hi,
If you''re trying to make the lines "Attached" to the viewport you have to define the vertices as D3DFVF_XYZ and you have to do some calculation to take the vertices to the frustum near plane, or you have to use clipping.

Share this post


Link to post
Share on other sites