Matrix usage

I’ve been reading up on matrices because I want a smoothly rotating third person camera (among other things). Unfortunately I can’t find any actual LWJGL code examples of manipulating a vector via a matrix. I’ve tried a bunch of stuff with no results.

All I need to do is rotate a vector position around another position. That can’t be too difficult, right? Any help is appreciated!

Let OpenGL do the matrix math for you:


glRotatef(0,0,rotation)

Can I use that to rotate a vector point? I’ve tried setting the current matrix with glLoadMatrix, and then using translate and rotate, but it has no effect. Do I have to link my vectors to the matrix somehow?

If your vectors are part of something drawn using OpenGL, yes you can use that. If not, no you can’t as far as I know.