I originally asked this question on gamedev, but none of the answers helped to solve problem, and I still have no clue what is the real cause. I didn\'t see anything about r
I ran into similar problem under iOS. After repeating the texture 127 times, bad things started to happen.
The solution that worked was this:
I used GL_TRIANGLE_STRIP
with some degenerate triangles. The texture is aligned to the vertieces, so at the edge of the texture there is an invisible (degenerate) triangle, where the texture is "displayed" mirrored as I set the texture coordinate to the origin. Thus the next visible triangle shows the texture from coordinate (0.0, 0.0)
and it never goes over coordinate (x, 127.0)
.
There is a blog post explaining this with some examples and pictures.