2

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?

House
  • 73,224
  • 17
  • 184
  • 273
tinu
  • 123
  • 1
  • 5

1 Answers1

2

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).

Glorfindel
  • 986
  • 1
  • 9
  • 16