Jump to content
  • Advertisement
Sign in to follow this  
G-Man9566

DrawPrimitiveUP line width

This topic is 2660 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 want to set the line width when drawing with DrawPrimitiveUP. Is this possible?

NOTE: im just drawing line primitives, but I want them "thicker"

G

Share this post


Link to post
Share on other sites
Advertisement
Sorry, you cannot. It's always "1 pixel". (If you're talking about DX9 because I don't know how is it in DX10/11).

You can render quads instead of lines, that will give you much better control over the result.

Share this post


Link to post
Share on other sites
Tom's answer, to treat a line as a very thin rectangle, will give you good results for single lines. If you want to render line strips you will need to take into account the angles at the corners as cracks will appear where the vertices on the outside of a corner don't coincide. If that's the case you'll probably have to have code at a higher level that generates geometry for the set of lines rather than treating lines independently.

Share this post


Link to post
Share on other sites

Sorry, you cannot. It's always "1 pixel". (If you're talking about DX9 because I don't know how is it in DX10/11).

That's a pity! and yes, im using DX9


You can render quads instead of lines, that will give you much better control over the result.



I'll give that a go!

G

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.

Participate in the game development conversation and more when you create an account on GameDev.net!

Sign me up!