DXUT架構剖析(12)

來源:互聯網
上載者:User

DXUT暫停函數

函數
描述

DXUTPause

將架構的內部計數器和(或)渲染過程設為暫停狀態

DXUTRenderingPaused

檢查當前裝置的渲染狀態是否處在暫停狀態

DXUTIsTimePaused

檢查當前裝置的計時器是否處在暫停狀態

DXUTPause

Sets the paused state of DXUT internal timer and/or rendering process.

  VOID DXUTPause(  
BOOL bPauseTime ,
BOOL bPauseRendering
) ;
Parameters
bPauseTime
[in] If TRUE, DXUT internal timer is paused. If FALSE, the timer is resumed from a paused state. See Remarks.
bPauseRendering
[in] If TRUE, DXUT will not call the LPDXUTCALLBACKD3D10FRAMERENDER callback function; DXUT will continue to call the LPDXUTCALLBACKFRAMEMOVE callback function. If FALSE, rendering will resume from a paused state. See Remarks.
Return Values

No return value.

Remarks

The timer controls the fTime and fElapsedTime parameters passed to the LPDXUTCALLBACKFRAMEMOVE or
render callback functions.

When time is paused, fTime will remain unchanged and fElapsedTime will be 0.0f. The LPDXUTCALLBACKFRAMEMOVE and
the render callback functions will still be called. This allows a camera to still move while time is paused.

When rendering is paused, the render callback function and the Direct3D Present method will not be called, and DXUT will periodically yield time to other processes by calling Sleep.

DXUTIsRenderingPaused

Indicates whether rendering has been paused in DXUT.

  BOOL DXUTIsRenderingPaused()  ;
Parameters

None.

Return Values

TRUE if rendering has been paused in DXUT.

DXUTIsTimePaused

Indicates whether time has been paused in DXUT.

  BOOL DXUTIsTimePaused()  ;
Parameters

None.

Return Values

TRUE if time has been paused in DXUT.

DXUT使用者輸入函數

函數
描述

DXUTIsKeyDown

檢查當該函數調用時,鍵盤上指定的某個鍵是否按下。

DXUTIsMouseButtonDown

檢查當該函數調用時,指定的滑鼠鍵是否按下。

DXUTIsKeyDown

Indicates whether a specified keyboard key is up or down at the time the function is called.

  BOOL DXUTIsKeyDown(  
BYTE vKey
) ;
Parameters
vKey
[in] Virtual key code of a keyboard key. For example VK_F1, VK_LSHIFT, VK_RCONTROL, VK_RMENU, and 41 (representing the 'A' key).
Return Values

TRUE if the specified vKey keyboard key is down; FALSE otherwise.

DXUTIsMouseButtonDown

Indicates whether a specified mouse button is up or down at the time the function is called.

  BOOL DXUTIsMouseButtonDown(  
BYTE vButton
) ;
Parameters
vButton
[in] Virtual key code of a mouse button. Allowed values are VK_LBUTTON, VK_RBUTTON, VK_MBUTTON, VK_XBUTTON1, and VK_XBUTTON2.
Return Values

TRUE if the specified vButton mouse button is down; FALSE otherwise.

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.