I’ve got my little space ship, in say list 1, and I have the angles that the players wants to rotate it by, but whenever I rotate it by those angles with

glRotatef(x_angle, 1, 0, 0);

glRotatef(y_angle, 0, 1, 0);

glRotatef(z_angle, 0, 0, 1);

but when the user wants to roll back, it rotates it round the global x axis rather than the local axis. So I do a nice bit of complex 3D trig to calculate the vectors to rotate around, but it still screws up as the vectors have also been rotated!

Help me please! An A level maths student who can’t do trig!

Simon Hall