I’ll try to be clear:
I have a scene I want to rotate around its x and z axis. The center of this rotation must be the center of my window. And, I want to pan this center in my view.
I tried this:
glTranslatef(panX, panY, 0); // pan view
glRotatef(rotX, 1, 0, 0); // rotate x
glRotatef(rotZ, 0, 0, 1);
glTranslatef(-panX, -panY, 0);// move rotation center in order to rotate around the center of my view
This was one of my numerous tests but it is one of the best !
Can someone tell me how I can do this ?