Hi guys, I am basically playing around with OpenGL and I have written some code to do Matrix-Matrix, Matrix-Vector multiplication also some functions to generate various matricies, but I take a flat box for example and rotate it in the y direction, it seems to rotate around the viewer and not its y axis, am I doing something wrong, the y rotation matrix is as follows:

;Y rotation Matrix

;cos(a) 0 -sin(a) 0

;0 1 0 0

;sin(a) 0 cos(a) 0

;0 0 0 1

Should I do something special?

;Y rotation Matrix

;cos(a) 0 -sin(a) 0

;0 1 0 0

;sin(a) 0 cos(a) 0

;0 0 0 1

Should I do something special?

First translate, then rotate...

And use glRotate.

And use glRotate.