Hi, i'm learning opengl through a little app and now ive bumped into the 3d rotational problem.

I store data for my object both the Rotation matrix and the quaternion. I want to visualize it and i tried to use glrotatef() with a quaternion_toAxisAngle() function but it doesnt quite work since glrotatef() accepts angles from 0 to 360 degrees and my quaternion_toAxisAngle() delivers an angle between -180 and 180 so when it starts to rotate around the x axis it does well between 0 and 180 degrees but then it stops rotating and gets stuck at 180 degrees. This happens when i apply a torque in the x axis.

I think i cannot modify my quaternion_toAxisAngle() function to match the angle requirements so what are the alternatives?

How can i do in order to have the object rotating 360 degrees?

thanks in advance from Spain!!