Rotation in different screen resolutions...?!?!
How would one go about rotating an object on the screen such as a 3d cube, pyramid, etc. as the SAME speed on any screen resolution. I noticed a dramatic increase of speed of the objects by going from 1024x768 to 640x480 even more so from going from 1280x1024 to 640x480. It is not an FPS problem but rather a problem about their being so many extra pixels on the screen. Anyways, the way that I accomplish the task is that I basically use an angle counter intialized at 0.0f which I increase by 1.0f until I hit 360.0f when I then make the angle 0.0f. Then i use the glRotatef() to rotate the objects coords in either a x,y, or z-axis direction. I use the arrow keys to do the rotation. While the key is pressed the angle counter is increased by 1.0f until the key is released. Is there a better way to do this to combat different screen resolutions? Any help would be greatly appreciated.
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement