Jump to content
  • Advertisement
Sign in to follow this  

Draw dashed stroke around rectangle/ellipse with single draw call

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

Hi all,

I want to draw dashed/dotted stroke outside rectangle or ellipse using trinagle strip primitive topology with single draw call (in one vertex array),

but I faced with the issue that using triangle strip always add extra triangles, which fill gaps and spoil the stroke.

Like on the attached image. 


Is there a way to combine different vertex arrays using triangle strip and prohibit creating extra triangles to leave gaps betweem them?


Share this post

Link to post
Share on other sites

I`ve added index -1 between two index arrays, but now second vertex array just does not draw.

I have 134 vertexes and 135 indices for them.

Am I doing something wrong here? 



Just after doing that I realized that I didnt made indices continuous and just merge two arrays starting from 0, so, second vertex array will not use as it starts from 92.

After fixing indexing I got exactly what I wanted to get.

Edited by BlackJoker

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.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!