开发者

Drawing lines with rounded endings with Direct3D

开发者 https://www.devze.com 2023-03-21 19:15 出处:网络
Is there any way to dra开发者_JS百科w a line using ID3DXLine with round endings? I am trying to draw a curve from number of line segments, but getting the empty areas where the line segments are conne

Is there any way to dra开发者_JS百科w a line using ID3DXLine with round endings? I am trying to draw a curve from number of line segments, but getting the empty areas where the line segments are connecting. Performance here is essential.

Thanks!


Any other fast way to draw thick curved line using D3D?


You would be best off using a circular texture (with antialiasing around the edges) and then drawing half the texture at either end of the line. You can then render a strip through the center of the texture the whole way along a rectangle surrounding the line before finishing off with the other half of the texture at the other end. This will give you the effect you are after but its a tad more involved than simply calling "DrawLine" or whatever ...

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号