View Single Post
03-26-18, 01:17 PM   #5
Seerah
Fishing Trainer
 
Seerah's Avatar
WoWInterface Super Mod
Featured
Join Date: Oct 2006
Posts: 10,860
Originally Posted by semlar View Post
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.
__________________
"You'd be surprised how many people violate this simple principle every day of their lives and try to fit square pegs into round holes, ignoring the clear reality that Things Are As They Are." -Benjamin Hoff, The Tao of Pooh

  Reply With Quote