DXUT框架剖析(10)
来源:互联网 发布:linux线程优先级的控制 编辑:程序博客网 时间:2024/05/18 12:41
本文版权归博客园 lovedday 所有,转载请详细标明原创作者及原文出处,以示尊重!
原创作者: lovedday
原文出处:DXUT框架剖析(10)
管理DXUT框架的函数
函数 描述 DXUTResetFrameworkState将框架状态重置为初始默认状态,之前设置的框架状态改变将失效。DXUTShutdown触发程序终止和清空框架DXUTGetExitCode获取框架的退出代码DXUTResetFrameworkState
Resets DXUT state to its initial default state. All previous DXUT state changes are lost.
VOID DXUTResetFrameworkState() ;
Parameters
None.
Return Values
No return value.
Remarks
This function does not normally need to be called. It is useful for testing purposes because the application process does not have to be restarted to reset DXUT back to its initial state.
DXUTShutdown
Triggers program termination and DXUT cleanup.
VOID DXUTShutdown(
int nExitCode
) ;
Parameters
- nExitCode
- [in] The exit code returned via the DXUTGetExitCode function. The default value is 0
Return Values
No return value.
Remarks
It is not necessary for the application to call this function, since the application lifespan is handled by DXUT. However, the application can call this function to cleanly terminate the application process.
DXUTGetExitCode
Get DXUT exit code.
INT DXUTGetExitCode() ;
Parameters
None.
Return Values
A DXUT exit code, which will be one of the following possible values.
Remarks
The return value of this function is typically used in the application as the return code of the application's WinMain function. Command-line tests can then be performed on applications using this return code.
The following is an example of command-line usage that uses DXUT exit code:
start /wait BasicHLSL.exe
echo %errorlevel%
检索Direct3D变量的函数
函数 描述 DXUTGetD3DObject获取一个指向IDirect3D9对象的指针DXUTGetD3D9Device获取一个指向代表当前设备的IDirect3DDevice9接口指针DXUTGetDeviceSettings获取用来创建当前设备的结构体DXUTDeviceSettingsDXUTGetPresentParameters获取当前设备的提交(presentation)参数DXUTGetD3D9BackBufferSurfaceDesc获取一个指向当前设备后台缓冲区表面的D3DSURFACE_DESC结构体的指针DXUTGetD3D9DeviceCaps获取一个指向当前设备的D3DCAPS9结构体的指针DXUTGetD3DObject
Get a pointer to the IDirect3D9 object.
IDirect3D9 * DXUTGetD3DObject() ;
Parameters
None.
Return Values
Pointer to the IDirect3D9 object. NULL is returned if no IDirect3D9 object has been created. See Remarks.
Remarks
This function exposes access to a global IDirect3D9 object. The reference count on this object interface is not incremented, so a calling function should not release the IDirect3D9 interface pointer returned by this function.
DXUTGetDeviceSettings
Get the DXUTDeviceSettings structure used to create the current device.
DXUTDeviceSettings DXUTGetDeviceSettings() ;
Parameters
None.
Return Values
DXUTDeviceSettings structure used to create the current device.
Remarks
This settings structure can describe either a Direct3D 9 device or a Direct3D 10 device as defined the structure's DXUTDeviceVersion member.
If no device exists, then the DXUTDeviceSettings structure is filled with zeros.
DXUTGetPresentParameters
Get the presentation parameters of the Direct3D 9 device.
D3DPRESENT_PARAMETERS DXUTGetPresentParameters() ;
Parameters
None.
Return Values
The presentation parameters of the Direct3D 9 device.
Remarks
If no Direct3D 9 device exists, then the D3DPRESENT_PARAMETERS structure is filled with zeros.
DXUTGetD3D9BackBufferSurfaceDesc
Get a pointer to a D3DSURFACE_DESC surface description of the current Direct3D 9 back buffer.
CONST D3DSURFACE_DESC * DXUTGetD3D9BackBufferSurfaceDesc() ;
Parameters
None.
Return Values
Pointer to a D3DSURFACE_DESC surface description of the current Direct3D 9 back buffer.
Remarks
If no Direct3D 9 device exists, then the D3DSURFACE_DESC structure is filled with zeros.
DXUTGetD3D9DeviceCaps
Get a pointer to the D3DCAPS9 capabilities of the current device.
CONST D3DCAPS9 * DXUTGetD3D9DeviceCaps() ;
Parameters
None.
Return Values
Pointer to the D3DCAPS9 capabilities of the Direct3D 9 device.
Remarks
If no Direct3D 9 device exists, then the D3DCAPS9 structure is filled with zeros.
- DXUT框架剖析(10)
- DXUT框架剖析(10)
- DXUT框架剖析(1)
- DXUT框架剖析(2)
- DXUT框架剖析(3)
- DXUT框架剖析(4)
- DXUT框架剖析(5)
- DXUT框架剖析(6)
- DXUT框架剖析(7)
- DXUT框架剖析(8)
- DXUT框架剖析(9)
- DXUT框架剖析(11)
- DXUT框架剖析(12)
- DXUT框架剖析(13)
- DXUT框架剖析(14)
- DXUT框架剖析(1)
- DXUT框架剖析
- DXUT框架剖析(1)
- Microsoft Access、MySQL 以及 SQL Server 所使用的数据类型和范围。
- DXUT框架剖析(9)
- C#操作Excel(导入导出)
- C# DataTable的詳細用法
- 在c++中回调c#函数遇到的字符串问题
- DXUT框架剖析(10)
- StringUtils
- DXUT框架剖析(11)
- 【转载】UBoot下添加OV9650寄存器操作的命令
- 简单内存泄漏检测方法 解决 Detected memory leaks! 问题
- Cannot get a connection, pool exhausted解决办法
- oracle闪回确实好用啊!!!!
- DXUT框架剖析(12)
- Spring值得深入研究挖掘!