• <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>

            天行健 君子當自強而不息

            DXUT框架剖析(11)

            DXUT統計函數

            函數 描述
            DXUTGetFPS 獲取當前每秒提交的幀數
            DXUTGetFrameStats 獲取一個指向字符串的指針,該字符串包括每秒幀數、分辨率、后臺緩沖區格式、深度緩沖區格式。
            DXUTGetDeviceStats 獲取一個指向字符串的指針,該字符串包括當前設備類型、頂點運算行為和設備名。

             

            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時間函數

            函數 描述
            DXUTGetTime 獲取當前時間(秒)
            DXUTGetElapsedTime 獲取從上一幀到當前幀所經過的時間
            DXUTSetConstantFrameTime 啟用或禁用固定幀時間

             

            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計時器函數

            函數 描述
            DXUTSetTimer 添加一個新的計時器
            DXUTKillTimer 卸載一個已有的計時器

            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 閱讀(1435) 評論(0)  編輯 收藏 引用

            公告

            導航

            統計

            常用鏈接

            隨筆分類(178)

            3D游戲編程相關鏈接

            搜索

            最新評論

            久久性生大片免费观看性| 国产精品久久成人影院| 久久久无码精品亚洲日韩蜜臀浪潮 | 久久精品国产欧美日韩| 国产伊人久久| 精品一二三区久久aaa片| 精品久久久久久国产潘金莲| 久久亚洲国产精品五月天婷| 99久久99久久精品免费看蜜桃| 久久这里有精品视频| 亚洲va国产va天堂va久久| 久久一区二区三区99| 久久久久夜夜夜精品国产| 2021国内精品久久久久久影院| 久久久久久噜噜精品免费直播| 亚洲精品白浆高清久久久久久| 久久成人永久免费播放| 久久九九亚洲精品| 国产精品一区二区久久| 少妇人妻88久久中文字幕| 午夜精品久久久久| 久久精品亚洲乱码伦伦中文 | 国产精品免费久久久久电影网| 免费久久人人爽人人爽av| 国内精品久久久久久久影视麻豆 | 精品久久久无码人妻中文字幕| 久久免费美女视频| 久久精品中文字幕久久| 97久久精品国产精品青草| 久久精品国产亚洲AV麻豆网站| 久久亚洲欧洲国产综合| 国产免费久久久久久无码| 久久www免费人成看国产片| 国内精品人妻无码久久久影院导航| 亚洲国产成人久久综合碰| 2021久久精品免费观看| 午夜视频久久久久一区| 亚洲国产精品成人久久蜜臀| 久久精品视频一| 国内精品综合久久久40p| 亚洲日本va中文字幕久久|