Path: chuka.playstation.co.uk!news From: "James Sutherland" Newsgroups: scee.yaroze.beginners Subject: Re: Questions about VSync. Date: Tue, 5 May 1998 08:34:16 +0100 Organization: PlayStation Net Yaroze (SCEE) Lines: 34 Message-ID: <6imf4g$jpr23@chuka.playstation.co.uk> References: <354C8851.709D2E83@chowfam.demon.co.uk> <6ij6jd$jpr18@chuka.playstation.co.uk> <354D8AA7.17CA37C6@chowfam.demon.co.uk> <354E298F.2865CC25@netmagic.net> <354E4EA8.A92F3D10@chowfam.demon.co.uk> NNTP-Posting-Host: guybrush.demon.co.uk X-Newsreader: Microsoft Outlook Express 4.71.1712.3 X-MimeOLE: Produced By Microsoft MimeOLE V4.71.1712.3 James Chow wrote in message <354E4EA8.A92F3D10@chowfam.demon.co.uk>... > >Will someone _just_ answer this question then. > >while (1) { > //do work > cnt = VSync(0); > //more work >} > >Why does cnt _not_ equal 312 for PAL or 262 for NTSC, through >each loop iteration? > It seems to me that perhaps it is returning the number of HSyncs since VSync last returned, rather than since it was last called. This would be a much more useful figure, since you could use it to determine how much more drawing time you can get out of your program, and you can use it to fix the logic rate of the program independent of the frame rate. So, with the balls demo, it takes 14 hsyncs to render a single ball, and this increases as you do more work. I'm not sure, though. Of course, even with the definition in the manual, you still wouldn't get 312 or 262 out of it unless you did the same amount of work each frame (since your VSync calls wouldn't be exactly a frame apart). -- James Sutherland, Software Engineer: Gremlin Interactive Ltd. Work: jamess@gremlin.co.uk Home: james@guybrush.demon.co.uk