Originally Posted by semlar
If you're rotating in 90 degree increments, you can skip doing any math and just shift the coordinates over (they're x,y pairs representing the corners of your texture). By moving the order of the SetTexCoord arguments by 2 you're changing which corner of the texture coordinates is being attached to which corner of your texture object.
|
Yes, this is probably best for 90 degree increments. You put what coordinates you would like as your top left, for example. (:SetTexCoord() can accept 8 arguments rather than 4.) You might even be about to use this for other rotation angles, if your math is correct.