vertical sync
these days, I am compelting vertical sync
https://msdn.microsoft.com/zh-cn/library/windows/desktop/bb172585(v=vs.85).aspx
|
This is nearly equivalent to D3DPRESENT_INTERVAL_ONE. See remarks. |
|
The driver will wait for the vertical retrace period (the runtime will "beam follow" to prevent tearing).Present operations will not be affected more frequently than the screen refresh; the runtime will complete at most one Present operation per adapter refresh period. This is equivalent to using D3DSWAPEFFECT_COPYVSYNC in DirectX 8.1. This option is always available for both windowed and full-screen swap chains. See remarks. |
|
The runtime updates the window client area immediately and might do so more than once during the adapter refresh period. This is equivalent to using D3DSWAPEFFECT_COPY in DirectX 8. Presentoperations might be affected immediately. This option is always available for both windowed and full-screen swap chains. See remarks. |
there are samples in dx sdk
vsync on ---D3DPRESENT_INTERVAL_DEFAULT
vsync off ---D3DPRESENT_INTERVAL_IMMEDIATE
deviceSettings.d3d10.SyncInterval = D3DPRESENT_INTERVAL_IMMEDIATE;
hr = pSwapChain ->Present( SyncInterval, dwFlags );
------------------------------------
垂直同步脉冲(Vertical synchronization, Vsync)是加在两帧之间。跟水平同步脉冲类似,但它指示着前一帧的结束,和新一帧的开始。 垂直同步脉冲是一个持续时间比较长的脉冲,可能持续一行或几行的扫描时间,但在这段时间内,没有像素信号出现。
http://baike.baidu.com/view/399524.htm
http://en.wikipedia.org/wiki/Analog_television#Vertical_synchronization
Remarks
Windowed mode supports D3DPRESENT_INTERVAL_DEFAULT, D3DPRESENT_INTERVAL_IMMEDIATE, and D3DPRESENT_INTERVAL_ONE. D3DPRESENT_INTERVAL_DEFAULT and the D3DPRESENT_INTERVAL_ONE are nearly equivalent (see the information regarding timer resolution below). They perform similarly to COPY_VSYNC in that there is only one present per frame, and they prevent tearing with beam-following. In contrast, D3DPRESENT_INTERVAL_IMMEDIATE will attempt to provide an unlimited presentation rate.
Full-screen mode supports similar usage as windowed mode by supporting D3DPRESENT_INTERVAL_IMMEDIATE regardless of the refresh rate or swap effect. D3DPRESENT_INTERVAL_DEFAULT uses the default system timer resolution whereas the D3DPRESENT_INTERVAL_ONE calls timeBeginPeriod to enhance system timer resolution. This improves the quality of vertical sync, but consumes slightly more processing time. Both parameters attempt to synchronize vertically.