Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

AGL_SWAP_INTERVAL problems



I to handle my game at an interval of 60 fps, but let it draw in sync with the display's refresh rate.

I used AGL_SWAP_INTERVAL for a long while.

If I handle the game at 60 fps and the monitor refresh rate is 60Hz, everything is fine.

The problem is, if I want to handle the game at 60 fps and the monitor refresh rate is 75Hz, the animation is no longer very smooth.

Going into full screen mode and setting the refresh rate to 60Hz doesn't work on all displays. Also, it is a very common feature these days run the game in window mode.

The question is, how can I let be game be handled at 60 fps, while drawing at whatever the monitor's refresh rate is, without impacting performance of the game (assuming the hardware can keep up.)

I have put together a small demo. If drawInterval and gameInterval are the same as the monitor, there is no problem. If they are different, the animation is not very smooth.

http://www.foxchange.com/matt/temp/refreshSyncProblem.sit



For those interested, I am working on this game:
http://www.foxchange.com/matt/dreamdizzy/index.php

It has some a long way and it is my first game written in C (one hell of a language to learn.)

--

///\\\///\\\ATT
http://www.foxchange.com/~matt

_______________________________________________
Do not post admin requests to the list. They will be ignored.
Mac-opengl mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/mac-opengl/email@hidden

This email sent to email@hidden


Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.