zoukankan      html  css  js  c++  java
  • vertical sync

    these days, I am compelting vertical sync

    https://msdn.microsoft.com/zh-cn/library/windows/desktop/bb172585(v=vs.85).aspx

     

    D3DPRESENT_INTERVAL_DEFAULT

    This is nearly equivalent to D3DPRESENT_INTERVAL_ONE. See remarks.

    D3DPRESENT_INTERVAL_ONE

    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.

    D3DPRESENT_INTERVAL_IMMEDIATE

    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.

  • 相关阅读:
    SQL Server 重新恢复自动编号列的序号
    AT指令
    wavecom短信猫常用AT命令
    Maven中-DskipTests和-Dmaven.test.skip=true的区别
    mybatis的插件,挺好支持下
    转java不同阶段的学习历程,总结的很不错,收了
    Java for循环和foreach循环的性能比较
    java synchronized 同步详解
    spring 中几种注解的说明
    zookeeper是什么?原理是什么?【转】
  • 原文地址:https://www.cnblogs.com/minggoddess/p/4347231.html
Copyright © 2011-2022 走看看