In my application i displayed a 3D object in a window and the axis is displayed in the left bottom corner of the window.For displaying axis,i specified a small viewport before drawinfg the axis and after drawing viewport restored.My problem is if i zoom /translate the object i don’t want to zoom/translate the axis.But the rotation of axis is allowed.Now the rotation/translation/zoom is also applied to the small viewport also
How i can achive this ??
Thanx in Advance,
Draw the object as usual, then before you draw the axes, reset the transformations and apply the rotation again.
The parameters in the second glRotate should be the same as in the first glRotate. This way, the object will be affected by the three transformations, and the axes will only be affected by the rotation.
Thank u Bob.
It is working well …
Thank u very much for ur reply