Archived

This topic is now archived and is closed to further replies.

Butt-head

VSync and screen tearing

Recommended Posts

Butt-head    122
Hi, I''ve noticed that when I switch on full screen multisampling, then objects that are moving in the scene become slightly jerky and start tearing a bit. I checked the frame rate and it drops from about 250 to 100 fps with antialiasing. I''m running it on a laptop with an LCD which may be related to the tearing I suppose. Anyway, I thought that turning on VSync might improve things a bit, as my LCD is always 60Hz. So, how do I enable VSync in DX8.1 ? Thanks

Share this post


Link to post
Share on other sites
Alex    122
Set the Presentation Interval parameter of the presentation parameters structure to D3DPRESENT_INTERVAL_DEFAULT or D3DPRESENT_INTERVAL_ONE.

As for your frame-rate drop, It''s really not big a problem. Frame-rate does not decrease linearly: read the article about frame-rate vs frame-time here.

Hope this helps!

Share this post


Link to post
Share on other sites
Butt-head    122
Thanks Alex, but I checked my code, and it''s setting D3DPRESENT_INTERVAL_ONE ok. So how come I get 250 fps ? I''m basing my code on the DX8 sample apps. And I''m using the frame rate calculated in the base class. Does the actual render function get called 250 fps, but the flip is only occuring at 60Hz (laptop LCD) ? I would have thought that BeginScene() would have blocked on the VSync if INTERVAL_ONE is specified - or something like that. Any ideas ?

Share this post


Link to post
Share on other sites