Jump to content
  • Advertisement
Sign in to follow this  
lukesmith123

Rendering geometry in wireframe

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

Hi,

I'm rendering some geometry in directx9 with the DrawIndexedPrimitive function by passing in the number of verts indices etc, using the triangle list primitive.

I want to render the geometry in wireframe using the line list or line strip primitive but I cant figure out how to do this.

I dont know what to put into the prim count paramater.

Could anybody explain how to do this?


thanks,

Share this post


Link to post
Share on other sites
Advertisement
Easier to just use SetRenderState (D3DRS_FILLMODE, D3DFILL_WIREFRAME) - that will give you a wireframe representation and you don't need to change any of your geometry, primitive types, etc.

Share this post


Link to post
Share on other sites
Actually, my experience has been that wireframe fill mode is sometimes dramatically slower, because the driver rewrites the geometry as lines. (This was more an ATI problem way back). Test it. It's okay for debugging, but you may want to create a separate index buffer for wireframe if it is an important part of your rendering.

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!