Archived

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

Lines

This topic is 5749 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

What are the fundamentals of drawing the equavialent of a line in 3d space... And how does it apply to dx8. How do you make a wireframe of an object? The purpose is for debugging, I want to see the generated boundingboxes for my objects. Thanks /Johan

Share this post


Link to post
Share on other sites
That's pretty easy. They work the same way as triangles, but they have only 2 vertices. When calling DrawPrimitive, you would specify something like D3DPT_TRIANGLELIST for triangles. For lines, use D3DPT_LINELIST. You'll probably want to disable texture mapping for them



Edit: oops. That should be D3DPT_LINELIST, of course.

[edited by - Kippesoep on March 18, 2002 6:06:04 AM]

Share this post


Link to post
Share on other sites


To render in wireframe:
pDevice->SetRenderState (D3DRS_FILLMODE,D3DFILL_WIREFRAME)

To render solid
pDevice->SetRenderState (D3DRS_FILLMODE,D3DFILL_SOLID);


Can you switch mode during between begin and end, ie, drawing one objekt using D3DFILL_WIREFRAME and the other using D3DFILL_SOLID?

Share this post


Link to post
Share on other sites