Take the 2-minute tour ×
Game Development Stack Exchange is a question and answer site for professional and independent game developers. It's 100% free, no registration required.

I can draw some curves using this:

GraphicsDevice.DrawUserPrimitives<VertexPositionColor>
           (PrimitiveType.LineStrip, Points, 0, count);

Now I try to set the PointSize to make the line thicker but I can only find a solution for XNA 3.0 using:

GraphicsDevice.RenderState.PointSize

How can I make my lines thicker in XNA 4.0?

share|improve this question
add comment

1 Answer

up vote 2 down vote accepted

XNA 4 does not support point sprites, which is (I believe) all that PointSize is for; for some rationale, see Shawn Hargreaves' blog post on the subject. The short version is that D3D10+ does not support them, and continuing to expose them in XNA restricts options for eventually moving XNA's underpinnings to a newer D3D version.

While it's not a decision that was met with universal praise, it's not the end of the world because you can simulate the effects yourself. It just requires more work. Fortunately, there are third-party solutions to do so that already exist -- something like the RoundLine library might serve your needs, or you can see this blog post about a similar technique (probably actually the same one RoundLine uses).

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.