Answer the question
In order to leave comments, you need to log in
How to draw a repeating texture along a line/polygon path?
That's what I mean. Moreover, the pattern should not start over from each top, it should continue. It is also noticeable how the dotted line works.
As far as I understand, it is impossible to bind a texture of arbitrary height directly to a line, because the line width is limited. To do this, triangulate each segment of the line and apply a texture to the polygons.
I solved the issue with triangulation in this way:
Drawing the resulting array of points through
GL_TRIANGLE_STRIP- I get a line of arbitrary width. It remains only to apply the texture in the right way. But with the texture coordinates, I'm completely confused.
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question