Sign in to follow this  

[SlimDX] Draw dotted line

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

There are plenty of papers floating around the internet on rendering thick lines (look for things like 'contour edges,' 'silhouette edge rendering,' 'thick,' 'textured' or 'stroked' line rendering, et cetera). You can then implement one of the algorithms described therein -- the textured line implementations will likely give you the easiest means of creating a dot or stipple pattern in the line.

Share this post


Link to post
Share on other sites
You should also be able to set a texture (and shader if you need it) on a standard line primitive, which will get you a dashed effect with an appropriate texture and UV coordinates. You'll probably want to wrap a texture along the length of the line, and set the UVs based on the line length so the dashes don't scale with line length.

Share this post


Link to post
Share on other sites
Thanks for answers. I use D3D9 and I want to use class SlimDX.Direct3D9.Line. When I use MDX to draw dotted line I use following pattern - 0x88888888. This pattern
is uint type. But member Pattern(class Line) is int type. When I cast 0x88888888 to int type it does not draw dotten line. How can I solve this problem?

Share this post


Link to post
Share on other sites

This topic is 2820 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.

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