Advertisement

Rotation in different screen resolutions...?!?!

Started by August 27, 2001 09:34 PM
0 comments, last by Viscous-Flow 23 years, 5 months ago
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.
the problem is easy in Low-Resolution,
all commands can be progressed fast.
But when you change in a higher Resolution,
your gfx-card had to do more and so is the
render-loop called not as much progressed as in
Low-Resolution. You should build in a timer!

This topic is closed to new replies.

Advertisement