• <ins id="pjuwb"></ins>
    <blockquote id="pjuwb"><pre id="pjuwb"></pre></blockquote>
    <noscript id="pjuwb"></noscript>
          <sup id="pjuwb"><pre id="pjuwb"></pre></sup>
            <dd id="pjuwb"></dd>
            <abbr id="pjuwb"></abbr>

            天行健 君子當(dāng)自強(qiáng)而不息

            DXUT框架剖析(11)

            DXUT統(tǒng)計(jì)函數(shù)

            函數(shù) 描述
            DXUTGetFPS 獲取當(dāng)前每秒提交的幀數(shù)
            DXUTGetFrameStats 獲取一個(gè)指向字符串的指針,該字符串包括每秒幀數(shù)、分辨率、后臺(tái)緩沖區(qū)格式、深度緩沖區(qū)格式。
            DXUTGetDeviceStats 獲取一個(gè)指向字符串的指針,該字符串包括當(dāng)前設(shè)備類型、頂點(diǎn)運(yùn)算行為和設(shè)備名。

             

            DXUTGetFPS

            Get the current number of frames being presented per second.

              FLOAT DXUTGetFPS()  ;

            Parameters

            None.

            Return Values

            The current number of frames being presented per second.

             

            DXUTGetFrameStats

            Get a pointer to a string containing the current number of frames per second (optionally), resolution, back buffer format, and depth stencil format.

              LPCWSTR DXUTGetFrameStats(  
            bool bIncludeFPS
            ) ;

            Parameters

            bIncludeFPS
            [in] If true, the string returned will contain the frames per second. Otherwise, it will not.

            Return Values

            Pointer to a string containing the current number of frames per second (optionally), resolution, back buffer format, and depth stencil format.

             

            DXUTGetDeviceStats

            Get a pointer to a string containing the current device type, vertex processing behavior, and device name.

              LPCWSTR DXUTGetDeviceStats()  ;

            Parameters

            None.

            Return Values

            Pointer to a string containing the current device type, vertex processing behavior, and device name.

             

            DXUT時(shí)間函數(shù)

            函數(shù) 描述
            DXUTGetTime 獲取當(dāng)前時(shí)間(秒)
            DXUTGetElapsedTime 獲取從上一幀到當(dāng)前幀所經(jīng)過的時(shí)間
            DXUTSetConstantFrameTime 啟用或禁用固定幀時(shí)間

             

            DXUTGetTime

            Get the current time, in seconds.

              DOUBLE DXUTGetTime()  ;

            Parameters

            None.

            Return Values

            The current time, in seconds.

            Remarks

            DXUT internally uses the best practices for high resolution timing information as described in the "Game Timing and Multicore Processors" article in the DirectX SDK.

             

            DXUTGetElapsedTime

            Get the time elapsed since the last frame.

              FLOAT DXUTGetElapsedTime()  ;

            Parameters

            None.

            Return Values

            Time elapsed, in seconds, since the last frame.

            Remarks

            DXUT internally uses the best practices for high resolution timing information as described in the "Game Timing and Multicore Processors" article in the DirectX SDK.

             

            DXUTSetConstantFrameTime

            Enables or disables a constant frame time.

              HRESULT DXUTSetConstantFrameTime(  
            BOOL bEnabled ,
            FLOAT fTimePerFrame
            ) ;

            Parameters

            bEnabled
            [in] If TRUE, a constant frame time will be enabled.
            fTimePerFrame
            [in] Time per frame, in seconds. The default value is 0.0333f, so the fTime parameter of LPDXUTCALLBACKFRAMEMOVE and the render callback functions will advance one second for every 30 frames.

            Return Values

            If the function succeeds, the return value is S_OK. If the function fails, the return value can be one of the error codes in DXUTERR.

            Remarks

            This function simulates a fixed-frame rate render loop by sending a constant value for elapsed time to the LPDXUTCALLBACKFRAMEMOVE and render callback functions. The default rate is one second for every 30 frames. The application itself will continue to render at an unregulated rate (which may be far higher than the specified frame rate).

            This function is useful for saving the rendered output to a video format for playback, allowing animation at a rate independent of the actual rate at which frames were rendered.

             

            DXUT計(jì)時(shí)器函數(shù)

            函數(shù) 描述
            DXUTSetTimer 添加一個(gè)新的計(jì)時(shí)器
            DXUTKillTimer 卸載一個(gè)已有的計(jì)時(shí)器

            DXUTSetTimer

            Starts a DXUT timer that will trigger a callback function at regular intervals.

              HRESULT DXUTSetTimer(  
            LPDXUTCALLBACKTIMER pCallbackTimer ,
            FLOAT fTimeoutInSecs ,
            UINT * pnIDEvent ,
            void * pCallbackUserContext
            ) ;

            Parameters

            pCallbackTimer
            [in] Pointer to a timer callback function. The callback function is to be called at the specified fTimeoutInSecs timeout intervals. May not be NULL.
            fTimeoutInSecs
            [in] Interval, in seconds, between successive calls to the timer callback function. The default value is 1.0f.
            pnIDEvent
            [in] Optional pointer to a variable to receive the event ID for the new timer. This event ID will be passed to the timer callback function to indicate which timer generated the event, allowing the application to use a single callback function for multiple timers. The default value is NULL.
            pCallbackUserContext
            [in] Pointer to a user-defined value which is passed to the callback function. Typically used by an application to pass a pointer to a data structure that provides context information for the callback function. The default value is NULL

            Return Values

            If the function succeeds, the return value is S_OK. If the function fails, the return value can be one of the error codes in DXUTERR.

            Remarks

            Timers created with DXUTSetTimer can be destroyed with DXUTKillTimer.

             

            LPDXUTCALLBACKTIMER

            A timer to be called at specified time intervals by DXUT.

              VOID LPDXUTCALLBACKTIMER(  
            UINT idEvent ,
            void* pUserContext
            ) ;

            Parameters

            idEvent
            [in] Specifies a nonzero timer event ID. Indicates which timer generated the event, allowing the application to use a single callback function for multiple timers.
            pUserContext
            [in] Pointer to a user-defined value which is passed to the callback function. Typically used by an application to pass a pointer to a data structure that provides context information for the callback function. The default value is NULL

            Return Values

            No return value.

            Remarks

            DXUT will call this function at the start of the frame, before calling LPDXUTCALLBACKFRAMEMOVE or LPDXUTCALLBACKD3D10FRAMERENDER.

             

            DXUTKillTimer

            Uninstalls an existing timer.

              HRESULT DXUTKillTimer(  
            UINT nIDEvent
            ) ;

            Parameters

            nIDEvent
            [in] The event ID for the timer being destroyed. This ID is provided to the application by the DXUTSetTimer method.

            Return Values

            If the function succeeds, the return value is S_OK. If the function fails, the return value can be one of the error codes in DXUTERR.

            Remarks

            Timers created with DXUTSetTimer can be destroyed with DXUTKillTimer .



            posted on 2008-05-16 22:03 lovedday 閱讀(1434) 評(píng)論(0)  編輯 收藏 引用


            只有注冊(cè)用戶登錄后才能發(fā)表評(píng)論。
            網(wǎng)站導(dǎo)航: 博客園   IT新聞   BlogJava   博問   Chat2DB   管理


            公告

            導(dǎo)航

            統(tǒng)計(jì)

            常用鏈接

            隨筆分類(178)

            3D游戲編程相關(guān)鏈接

            搜索

            最新評(píng)論

            无码任你躁久久久久久老妇| 国内精品久久久久影院一蜜桃| 国产精品久久久久…| 一级做a爰片久久毛片人呢| 日本亚洲色大成网站WWW久久| 久久AAAA片一区二区| 欧美无乱码久久久免费午夜一区二区三区中文字幕 | 囯产精品久久久久久久久蜜桃| 中文字幕乱码久久午夜| 精品一区二区久久久久久久网站| 国产成人香蕉久久久久| 精品伊人久久大线蕉色首页| 亚洲成色999久久网站| 国产精品中文久久久久久久| 久久久久亚洲av无码专区| 久久av高潮av无码av喷吹| 久久人人爽人人爽人人AV东京热 | 伊人久久综合成人网| 国产成人精品久久亚洲高清不卡 | 久久久久久久女国产乱让韩| 亚洲天堂久久精品| 色8久久人人97超碰香蕉987| 久久久久久久亚洲精品| 久久久久亚洲AV无码麻豆| 久久亚洲国产成人精品无码区| 99re久久精品国产首页2020| 久久久久久精品无码人妻| 久久天天日天天操综合伊人av| 久久婷婷久久一区二区三区| 午夜久久久久久禁播电影| 亚洲综合久久夜AV | 久久精品国产亚洲7777| 2021国产成人精品久久| 久久久久久久精品妇女99| 波多野结衣久久精品| 97视频久久久| 亚洲国产精品高清久久久 | 欧美亚洲色综久久精品国产| 久久这里都是精品| 国产成年无码久久久免费| 欧美激情精品久久久久久久九九九|