Re: Programming a game
Re: Programming a game
- Subject: Re: Programming a game
- From: Ambroise Confetti <email@hidden>
- Date: Mon, 17 Nov 2003 03:44:18 +0100
Le 17 nov. 03, ` 00:13, Clark Cox a icrit :
>
On Nov 16, 2003, at 15:14, Ambroise Confetti wrote:
>
>
>
> About syncing your redraw with vertical retrace, you have to be
>
> careful
>
> with that, since it can also reduce the frame rate.
>
>
If your framerate is reduced by synching with the VBL, then that is a
>
*good* thing, as drawing frames faster than the VBL is a waste, as the
>
user will never be able to see it. For example, if the screen
>
refreshes at 60 Hz, but you're drawing at 120 fps, then half of your
>
frames will never be drawn to the screen, and any CPU time that you
>
spent rendering those never-displayed frames is wasted.
In the case you present it is a good thing. However, if your
computations for a frame take 1/60 s + a smaller amount of time, you
may "miss" the refresh and lose CPU time waiting for the next one.
In the worst case, almost 50% frames can be lost.
Ambroise
http://www.cellulo.info/
ICQ 4508259
AIM atvaark
[demime 0.98b removed an attachment of type text/directory which had a name of Ambroise Confetti.vcf]
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.