Welcome, Guest. Please login or register. Did you miss your activation email?

Author Topic: Dashed lines  (Read 5052 times)

0 Members and 1 Guest are viewing this topic.

roccio

  • Jr. Member
  • **
  • Posts: 64
    • View Profile
    • Email
Dashed lines
« on: October 07, 2016, 03:14:10 pm »
Hello, I need to draw some dashed lines, what do you think is the best way?

DarkRoku12

  • Full Member
  • ***
  • Posts: 203
  • Lua coder.
    • View Profile
    • Email
Re: Dashed lines
« Reply #1 on: October 07, 2016, 04:09:47 pm »
I would like a spanish/latin community...
Problems building for Android? Look here

roccio

  • Jr. Member
  • **
  • Posts: 64
    • View Profile
    • Email
Re: Dashed lines
« Reply #2 on: October 07, 2016, 04:19:54 pm »
Here it is

---   ---   ---   ---

More in attach

DarkRoku12

  • Full Member
  • ***
  • Posts: 203
  • Lua coder.
    • View Profile
    • Email
Re: Dashed lines
« Reply #3 on: October 07, 2016, 04:32:12 pm »
So, you can use sf::VertexArray

Check its tutorial.

Will be easy to set up a line using the 'lines' primitive type.

So, 5 lines will be equal to 10 vertices.

If you need thickness you can use sf::Triangles (don't use Quads because are deprecated and is not compatible with OpenGL ES)

VertexArray are the easiest, faster, optimized and flexible way to achieve this.

« Last Edit: October 07, 2016, 04:35:26 pm by DarkRoku »
I would like a spanish/latin community...
Problems building for Android? Look here

roccio

  • Jr. Member
  • **
  • Posts: 64
    • View Profile
    • Email
Re: Dashed lines
« Reply #4 on: October 07, 2016, 04:45:44 pm »
Thank you!