The routine I need is a function that would calculate a 4x4 rotation matrix in opengl around an arbitrary point (vertex T(x,y,z,w)) based on a previous matrix. Something like
function RotateAroundAoint(point,angx,angy,angz,matrix): matrix.
for example:
glLoadidentity;
gltranslatef(10,-1,5);
glRotatef(20,10,-30);
glGetfloatv(GL_MODELVIEW_MATRIX,@m);
M:=RotateAroundPoint(Vetex(1,2,3,1),10,20,40,M)
GlLoadMatrixfv(@m);
DrawScene;
So if somebody could help me with some code or an precise idea how I could do this I would really appreciated it.