Jump to content
  • Advertisement
Sign in to follow this  
AshleysBrain

D3D9 / 2D / C++: Draw antialiased lines?

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

I'm trying to draw nice anti-aliased lines in 2D in my app, but they always come out with a single line of pixels the same colour (ie, aliased), even when I make the start and end vertices in between pixels. I'm using DrawPrimitive with D3DPT_LINELIST, and have set SetRenderState(D3DRS_ANTIALIASEDLINEENABLE, TRUE), and still no joy. Anyone have any idea whats wrong?

Share this post


Link to post
Share on other sites
Advertisement
Another option here is to procedurally generate a texture that has a line on it, i'm not sure if this is suitable for your needs though. That algorithm for drawing the line isn't that tricky in terms of filling pixels.

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!