Sign in to follow this  
AshleysBrain

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

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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this