You seem to be using glRotatef incorrectly. The last three parameters are used to specify the axis around which you rotate. For wheel-like spinning behaviour, this axis should surely not depend on the angle. For a wheel rotating on the horizontal plane, you’d used a vertical axis
glRotatef(angle, .0f, 1.0f, .0f);
Rotating on the x=c plane, you’d use the x-axis
glRotatef(angle, 1.0f, .0f, .0f);
If you had a wheel that could turn left and right with the steering wheel for example, you could perform two rotations: one for the point on the wheel, and one for the axis of the wheel.