• <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框架剖析(10)

            管理DXUT框架的函數(shù)

            函數(shù) 描述
            DXUTResetFrameworkState 將框架狀態(tài)重置為初始默認(rèn)狀態(tài),之前設(shè)置的框架狀態(tài)改變將失效。
            DXUTShutdown 觸發(fā)程序終止和清空框架
            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.

            Value Description
            0 Successful execution.
            1 An undetermined error occurred.
            2 No Direct3D device could be found with the specified device settings.
            3 A media file could not be found.
            4 The Direct3D device has a non-zero reference count, meaning that some objects were not released.
            5 An error occurred when attempting to create an Direct3D device.
            6 An error occurred when attempting to reset an Direct3D device.
            7 An error occurred in the device creation callback function.
            8 An error occurred in the device creation callback function.
            9 The incorrect version of Direct3D or D3DX is installed.
            10 The last device used upon exit was a REF device type.
            11 The device was removed.
             

            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變量的函數(shù)

            函數(shù) 描述
            DXUTGetD3DObject 獲取一個(gè)指向IDirect3D9對象的指針
            DXUTGetD3D9Device 獲取一個(gè)指向代表當(dāng)前設(shè)備的IDirect3DDevice9接口指針
            DXUTGetDeviceSettings 獲取用來創(chuàng)建當(dāng)前設(shè)備的結(jié)構(gòu)體DXUTDeviceSettings
            DXUTGetPresentParameters 獲取當(dāng)前設(shè)備的提交(presentation)參數(shù)
            DXUTGetD3D9BackBufferSurfaceDesc 獲取一個(gè)指向當(dāng)前設(shè)備后臺緩沖區(qū)表面的D3DSURFACE_DESC結(jié)構(gòu)體的指針
            DXUTGetD3D9DeviceCaps 獲取一個(gè)指向當(dāng)前設(shè)備的D3DCAPS9結(jié)構(gòu)體的指針

             

            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.


             

            posted on 2008-05-16 21:09 lovedday 閱讀(2349) 評論(0)  編輯 收藏 引用


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


            公告

            導(dǎo)航

            統(tǒng)計(jì)

            常用鏈接

            隨筆分類(178)

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

            搜索

            最新評論

            精品久久久中文字幕人妻| 久久久久av无码免费网| 国产精品久久国产精麻豆99网站| AV无码久久久久不卡蜜桃| 久久成人精品视频| 久久久久久国产a免费观看不卡| 色狠狠久久综合网| 欧美激情精品久久久久| 久久久久无码中| 久久狠狠高潮亚洲精品| 久久伊人亚洲AV无码网站| 久久影院综合精品| 欧美日韩精品久久久免费观看| 亚洲∧v久久久无码精品| 久久国产乱子伦精品免费午夜| 麻豆成人久久精品二区三区免费 | 日韩精品久久无码人妻中文字幕| 久久精品国产99国产精偷| 久久毛片一区二区| 久久99精品免费一区二区| 色狠狠久久AV五月综合| 亚洲国产一成久久精品国产成人综合| 久久精品人人做人人爽电影蜜月| 亚洲精品无码久久毛片| 精品无码久久久久久久久久| 国产精品久久久久9999| 狠狠综合久久AV一区二区三区| 久久久久亚洲精品天堂久久久久久 | 99久久人妻无码精品系列| 久久亚洲视频| 久久久国产一区二区三区| 亚洲国产精品久久久久婷婷老年| 久久水蜜桃亚洲av无码精品麻豆 | 99精品久久久久中文字幕| 久久亚洲日韩看片无码| 亚洲第一永久AV网站久久精品男人的天堂AV| 国产成人无码久久久精品一 | 久久婷婷综合中文字幕| 久久久青草久久久青草| 品成人欧美大片久久国产欧美| 日韩欧美亚洲综合久久影院d3|