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
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]
Edit: oops. That should be D3DPT_LINELIST, of course.
[edited by - Kippesoep on March 18, 2002 6:06:04 AM]
Thanks!
Well, I feel stupid for not reading the docs!
Are you sure its D3DPT_LINELIST? hehe
/Johan the primitive
Well, I feel stupid for not reading the docs!
Are you sure its D3DPT_LINELIST? hehe
/Johan the primitive
To render in wireframe:
pDevice->SetRenderState (D3DRS_FILLMODE,D3DFILL_WIREFRAME)
To render solid
pDevice->SetRenderState (D3DRS_FILLMODE,D3DFILL_SOLID);
pDevice is supposed to be a valid pointer to DX8
pDevice->SetRenderState (D3DRS_FILLMODE,D3DFILL_WIREFRAME)
To render solid
pDevice->SetRenderState (D3DRS_FILLMODE,D3DFILL_SOLID);
pDevice is supposed to be a valid pointer to DX8
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement