Additional Sample Framework Functions
Microsoft DirectX 9.0 SDK Update (October 2004)

Additional Sample Framework Functions


Following is a selection of functions that allow you to change the behavior of the sample framework and to retrieve internal variables. For all available framework functions, see Sample Framework Functions.

FunctionDescription
Window Management
DXUTGetHWNDGets a handle to the current device window.
DXUTGetHWNDFocusGets the handle of the focus window.
DXUTGetHWNDDeviceFullScreenGets the handle of the full-screen mode device window.
DXUTGetHWNDDeviceWindowedGets the handle of the windowed mode device window.
DXUTGetWindowClientRectGets the client rectangle of the application device window.
DXUTGetWindowTitleGets a pointer to the application window title.
DXUTIsWindowedIndicates whether the application is in windowed mode.
Device Management
DXUTSetCursorSettingsSets options for cursor usage in full-screen mode.
DXUTSetMultimonSettingsSets options for how the framework functions on multiple monitors.
DXUTToggleFullscreenSwitches the application between windowed and full-screen modes.
DXUTToggleREFSwitches the application between hardware abstraction layer (HAL) and reference devices.
Sample Framework Management
DXUTResetFrameworkStateResets the framework state to its initial default state. All previous framework state changes are lost.
DXUTShutdownTriggers program termination and framework cleanup.
DXUTGetExitCodeGets the framework exit code.
Microsoft Direct3D Variable Retrieval
DXUTGetD3DObjectGets a pointer to the IDirect3D9 object.
DXUTGetD3DDeviceGets a pointer to the IDirect3DDevice9 interface that represents the current device.
DXUTGetDeviceSettingsGets the DXUTDeviceSettings structure used to create the current device.
DXUTGetPresentParametersGets the presentation parameters of the current device.
DXUTGetBackBufferSurfaceDescGets a pointer to a D3DSURFACE_DESC surface description of the back buffer on the current adapter.
DXUTGetDeviceCapsGets a pointer to the D3DCAPS9 capabilities of the current device.
Statistics
DXUTGetFPSGets the current number of frames being presented per second.
DXUTGetFrameStatsGets a pointer to a string containing the current number of frames per second, resolution, back buffer format, and depth stencil format.
DXUTGetDeviceStatsGets a pointer to a string containing the current device type, vertex processing behavior, and device name.
Time
DXUTGetTimeGets the current time, in seconds.
DXUTGetElapsedTimeGets the time elapsed since the last frame.
DXUTSetConstantFrameTimeEnables or disables a constant frame time.
Timer
DXUTSetTimerInstalls a new timer.
DXUTKillTimerUninstalls an existing timer.
Pause
DXUTPauseSets the paused state of the framework internal timer and/or rendering process.
DXUTIsRenderingPausedIndicates whether rendering has been paused on the current device.
DXUTIsTimePausedIndicates whether time has been paused on the current device.
User Input
DXUTIsKeyDownIndicates whether a specified keyboard key is up or down at the time the function is called.
DXUTIsMouseButtonDownIndicates whether a specified mouse button is up or down at the time the function is called.
Device Settings Dialog
DXUTGetShowSettingsDialogIndicates whether the sample framework's device settings dialog box is currently showing.
DXUTSetShowSettingsDialogShows or hides the sample framework's device settings dialog box.


© 2004 Microsoft Corporation. All rights reserved.
Feedback? Please provide us with your comments on this topic.
For more help, visit the DirectX Developer Center.