I have problem understanding the mechanism of glrotatef or how does it work, after doing some research I found out that it consists it takes 4 variables, which are the angle that I use to rotate, 1 or 0 for x axis, 1 or 0 for y axis, and 1 or 0 for z axis.
answering of the following questions will help me understanding the glrotatef
the questions are
- if we're talking about a square that we want to rotate it, the angle that we send to the function glrotatef, will it work on vertex points of the square, or on the lines to rotate them ?
- what is the difference between writing the function glRotatef one time, and writing it four times when using it on rotating a square, does every one glRotatef function work on one side of the square ?
- how can I use glrotatef & gltranslatef to rotate a square around itself without moving from it's place.
- can anyone explain in the simplest way how does glrotatef work, and give some examples without relating to any part of codes because I'm a newbie and I didn't understand most of the codes written on stackoverflow questions about glrotatef.