I’m trying to make the global origin visible on the screen and also add the x, y and z symbols to the axis. I want the symbols to rotate with axis but also rotate the same angles in the opposite direction so they always remain readable on the screen. I can do this if I only rotate in one direction but when mixing x, y, z rotations after each other the symbols show up wrong. Here is part of the code,
glRotatef (x_rotation, 1.0, 0.0, 0.0);
glRotatef (y_rotation, 0.0, 1.0, 0.0);
glRotatef (z_rotation, 0.0, 0.0,1.0);
here follows drawing of some objects
drawing line segments showing the x, y, z axis
glTranslatef (x_translation, 0, 0);
glRotatef (-x_rotation, 1.0, 0.0, 0.0);
glRotatef (-y_rotation, 0.0, 1.0, 0.0);
glRotatef (-z_rotation, 0.0, 0.0, 1.0);
After here I do the same for y and z.
Suggestions about what’s wrong or a working code would be appreciated.