How to roll texture around 2D object (square)

Started by
10 comments, last by EasyCoder 12 years, 1 month ago
your texture wrap mode is probably set to clamping, you'll need to set that to repeat. look at glTexParameterf. If you're using hardware wrapping you might want to make sure you reset your roll every now and then because some hardware can only repeat up to a certain amount, so for example substract 1 from roll if it's bigger than 1.
Advertisement
your texture wrap mode is probably set to clamping, you'll need to set that to repeat. look at glTexParameterf.


I have tried all combinations of GL_CLAMP_TO_EDGE and GL_REPEAT for S and T coordinates without any change.

But thanks for pointing me in this direction, because I have looked on the tutorial where I took some of the code from, again and found this comment by someone:

I was trying to implement a similar functionality using glDrawArrays. However, I’m unable to get it running on Android. I’m trying port an existing iPhone application to Android. The same openGL code works fine on iPhone.



I am also using glDrawArrays, so I suspect this will be the root of my problem.

I will try replacing glDrawArrays with glDrawElements and see if that makes any difference.

This topic is closed to new replies.

Advertisement