Arne priest at seraphim.info
Thu Sep 12 00:10:02 PDT 2002

> Not sure if this is SDL or OpenGL related, I am trying to simple rotate
> a QUAD (yes very newbie question) but am not getting the results I 
> want.
> Basically what's happening is that the QUAD is rotating around the top
> left vertex and not around the quad's center. I would like it to rotate
> around the center of the quad. This this how OpenGL works or am I doing
> something wrong? The code is as follow:

First rotate, then translate - multiplication of transformation 
matrices is not commutative (I really need a mathametical 
german-english dictionary ... =)  - meaning:

Translate -> rotate is different from rotate -> translate

You're always rotating around the center of your coordinate system. So 
if you want only your quad rotated first translate it to 0,0,0, rotate 
and after this translate back.


More information about the SDL mailing list