• Advertisement

Archived

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

Drawing 2D lines using line lists

This topic is 5435 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

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
Advertisement
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
even easier would just make them like a billboard and have them always face the camera.

Brett Lynnes
cheez_keeper@hotmail.com

Share this post


Link to post
Share on other sites

  • Advertisement