青青草原综合久久大伊人导航_色综合久久天天综合_日日噜噜夜夜狠狠久久丁香五月_热久久这里只有精品

關(guān)于DirectX使用的一些注意事項

1.關(guān)于創(chuàng)建Direct3D設(shè)備對象
   創(chuàng)建Direct3D設(shè)備對象時,需要先創(chuàng)建Direct3D對象,然后再調(diào)用Direct3D對象的接口函數(shù)IDirect3D9::CreateDevice創(chuàng)建Direct3D設(shè)備對象。通過同一個Direct3D對象創(chuàng)建的所有Direct3D設(shè)備對象共享相同的物理資源(顯卡)。因?yàn)楣蚕硗挥布匀绻ㄟ^一個Direct3D對象創(chuàng)建多個Direct3D渲染設(shè)備對象會明顯降低系統(tǒng)性能。
   在創(chuàng)建Direct3D設(shè)備對象之前,還需要先初始化D3DPRESENT_PARAMENTERS結(jié)構(gòu),該結(jié)構(gòu)用于創(chuàng)建Direct3D設(shè)備對象。此結(jié)構(gòu)將會影響Direct3D設(shè)備的顯示方法。
      

D3DPRESENT_PARAMETERS

Describes the presentation parameters.

typedef struct D3DPRESENT_PARAMETERS {
    UINT BackBufferWidth, BackBufferHeight;
    D3DFORMAT BackBufferFormat;
    UINT BackBufferCount;
    D3DMULTISAMPLE_TYPE MultiSampleType;
    DWORD MultiSampleQuality;
    D3DSWAPEFFECT SwapEffect;
    HWND hDeviceWindow;
    BOOL Windowed;
    BOOL EnableAutoDepthStencil;
    D3DFORMAT AutoDepthStencilFormat;
    DWORD Flags;
    UINT FullScreen_RefreshRateInHz;
    UINT PresentationInterval;
} D3DPRESENT_PARAMETERS, *LPD3DPRESENT_PARAMETERS;

Members

BackBufferWidth, BackBufferHeight
Width and height of the new swap chain's back buffers, in pixels. If Windowed is FALSE (the presentation is full-screen), these values must equal the width and height of one of the enumerated display modes found through IDirect3D9::EnumAdapterModes. If Windowed is TRUE and either of these values is zero, the corresponding dimension of the client area of the hDeviceWindow (or the focus window, if hDeviceWindow is NULL) is taken.
BackBufferFormat
The back buffer format. For more information about formats, see D3DFORMAT. This value must be one of the render-target formats as validated by IDirect3D9::CheckDeviceType. You can use IDirect3DDevice9::GetDisplayMode to obtain the current format.

In fact, D3DFMT_UNKNOWN can be specified for the BackBufferFormat while in windowed mode. This tells the runtime to use the current display-mode format and eliminates the need to call IDirect3DDevice9::GetDisplayMode.

For windowed applications, the back buffer format no longer needs to match the display-mode format because color conversion can now be done by the hardware (if the hardware supports color conversion). The set of possible back buffer formats is constrained, but the runtime will allow any valid back buffer format to be presented to any desktop format. (There is the additional requirement that the device be operable in the desktop mode; devices typically do not operate in 8 bits per pixel modes.)

Full-screen applications cannot do color conversion.

BackBufferCount
This value can be between 0 and D3DPRESENT_BACK_BUFFERS_MAX (or D3DPRESENT_BACK_BUFFERS_MAX_EX when using Direct3D 9Ex). Values of 0 are treated as 1. If the number of back buffers cannot be created, the runtime will fail the method call and fill this value with the number of back buffers that could be created. As a result, an application can call the method twice with the same D3DPRESENT_PARAMETERS structure and expect it to work the second time.

The method fails if one back buffer cannot be created. The value of BackBufferCount influences what set of swap effects are allowed. Specifically, any D3DSWAPEFFECT_COPY swap effect requires that there be exactly one back buffer.

MultiSampleType
Member of the D3DMULTISAMPLE_TYPE enumerated type. The value must be D3DMULTISAMPLE_NONE unless SwapEffect has been set to D3DSWAPEFFECT_DISCARD. Multisampling is supported only if the swap effect is D3DSWAPEFFECT_DISCARD.
MultiSampleQuality
Quality level. The valid range is between zero and one less than the level returned by pQualityLevels used by IDirect3D9::CheckDeviceMultiSampleType. Passing a larger value returns the error D3DERR_INVALIDCALL. Paired values of render targets or of depth stencil surfaces and D3DMULTISAMPLE_TYPE must match.
SwapEffect
Member of the D3DSWAPEFFECT enumerated type. The runtime will guarantee the implied semantics concerning buffer swap behavior; therefore, if Windowed is TRUE and SwapEffect is set to D3DSWAPEFFECT_FLIP, the runtime will create one extra back buffer and copy whichever becomes the front buffer at presentation time.

D3DSWAPEFFECT_COPY requires that BackBufferCount be set to 1.

D3DSWAPEFFECT_DISCARD will be enforced in the debug runtime by filling any buffer with noise after it is presented.

Differences between Direct3D9 and Direct3D9Ex

In Direct3D9Ex, D3DSWAPEFFECT_FLIPEX is added to designate when an application is adopting flip mode. That is, whan an application's frame is passed in window's mode (instead of copied) to the Desktop Window Manager(DWM) for composition. Flip mode provides more efficient memory bandwidth and enables an application to take advantage of full-screen-present statistics. It does not change full screen behavior. Flip mode behavior is available beginning with Windows 7.

hDeviceWindow
The device window determines the location and size of the back buffer on screen. This is used by Direct3D when the back buffer contents are copied to the front buffer during IDirect3DDevice9::Present.
  • For a full-screen application, this is a handle to the top window (which is the focus window).

    For applications that use multiple full-screen devices (such as a multimonitor system), exactly one device can use the focus window as the device window. All other devices must have unique device windows.

  • For a windowed-mode application, this handle will be the default target window for IDirect3DDevice9::Present. If this handle is NULL, the focus window will be taken.

Note that no attempt is made by the runtime to reflect user changes in window size. The back buffer is not implicitly reset when this window is reset. However, the IDirect3DDevice9::Present method does automatically track window position changes.

Windowed
TRUE if the application runs windowed; FALSE if the application runs full-screen.
EnableAutoDepthStencil
If this value is TRUE, Direct3D will manage depth buffers for the application. The device will create a depth-stencil buffer when it is created. The depth-stencil buffer will be automatically set as the render target of the device. When the device is reset, the depth-stencil buffer will be automatically destroyed and recreated in the new size.

If EnableAutoDepthStencil is TRUE, then AutoDepthStencilFormat must be a valid depth-stencil format.

AutoDepthStencilFormat
Member of the D3DFORMAT enumerated type. The format of the automatic depth-stencil surface that the device will create. This member is ignored unless EnableAutoDepthStencil is TRUE.
Flags
One of the D3DPRESENTFLAG constants.
FullScreen_RefreshRateInHz
The rate at which the display adapter refreshes the screen. The value depends on the mode in which the application is running:
  • For windowed mode, the refresh rate must be 0.
  • For full-screen mode, the refresh rate is one of the refresh rates returned by IDirect3D9::EnumAdapterModes.
PresentationInterval
The maximum rate at which the swap chain's back buffers can be presented to the front buffer. For a detailed explanation of the modes and the intervals that are supported, see D3DPRESENT.

Requirements

Header: Declared in D3D9Types.h. 
      幾個重要的參數(shù)加以解釋說明一下,其中BackBufferWidth和BackBufferHeight指定后臺緩存區(qū)的寬高(以像素為單位)。如果圖形以窗口方式顯示并且該成員變量被設(shè)置為0,則系統(tǒng)自動使用顯示窗口客戶區(qū)的寬高作為后臺緩沖區(qū)的寬高。BackBufferCount指定后臺緩沖區(qū)的數(shù)量。該值可以為0、1、2、3,其中0和1時都表示創(chuàng)建一個后臺緩沖區(qū)。通常使用一個后臺緩沖區(qū)和一個主緩存,主緩存將其顯示在屏幕上。

posted on 2012-02-16 15:24 Daywei 閱讀(982) 評論(0)  編輯 收藏 引用 所屬分類: DirectX

<2012年2月>
2930311234
567891011
12131415161718
19202122232425
26272829123
45678910

導(dǎo)航

統(tǒng)計

常用鏈接

留言簿

隨筆分類

隨筆檔案

文章檔案

牛人博客

搜索

積分與排名

最新評論

閱讀排行榜

青青草原综合久久大伊人导航_色综合久久天天综合_日日噜噜夜夜狠狠久久丁香五月_热久久这里只有精品
  • <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>
            国产视频观看一区| 亚洲精品综合久久中文字幕| 欧美日韩一区成人| 欧美激情一区二区三区在线视频| 久久精品在这里| 老牛国产精品一区的观看方式| 午夜精品久久久久久久99热浪潮| 一片黄亚洲嫩模| 欧美一区二区免费观在线| 先锋a资源在线看亚洲| 午夜一级在线看亚洲| 久久成人国产| 欧美激情在线狂野欧美精品| 亚洲人www| 国产精品五区| 欧美一区二区三区另类 | 欧美大片va欧美在线播放| 欧美成人一区二区在线| 欧美精品一区二区三区很污很色的| 欧美日韩亚洲不卡| 国产免费成人av| 亚洲国产另类精品专区| 宅男噜噜噜66一区二区66| 亚洲你懂的在线视频| 午夜精品一区二区三区四区| 国产美女精品视频| 在线观看福利一区| 亚洲专区一区| 欧美第一黄网免费网站| 亚洲午夜在线| 欧美激情精品久久久久久蜜臀 | 欧美一级网站| 欧美区一区二区三区| 国产欧美精品| 亚洲免费黄色| 久久精品视频免费观看| 亚洲三级免费电影| 久久精品91久久香蕉加勒比 | 欧美日韩高清一区| 影音先锋久久精品| 久久成人一区二区| 精品成人免费| 久久精品午夜| 欧美日韩蜜桃| 亚洲国产影院| 久久综合免费视频影院| 亚洲欧美日韩精品| 欧美视频在线免费| 欧美日韩1080p| 亚洲综合不卡| 国产精品久久久久久久久久久久久| 精品成人a区在线观看| 欧美在线观看视频一区二区三区 | 在线播放中文字幕一区| 性刺激综合网| 亚洲影院一区| 国产精品你懂的在线欣赏| 一本色道久久综合狠狠躁篇怎么玩 | 国产午夜精品久久久久久久| 久久一区欧美| 国产欧美日韩综合| 亚洲综合二区| 日韩一级精品| 欧美日韩国产区| 亚洲精品视频免费| 免费观看在线综合| 国产一区激情| 国产精品久久久久久久久久直播 | 国产美女精品免费电影| 亚洲免费一在线| 99综合在线| 国产精品99久久久久久www| 欧美美女喷水视频| 日韩视频三区| 亚洲久久成人| 国产精品久久久久久模特| 亚洲男同1069视频| 一区二区日韩欧美| aaa亚洲精品一二三区| 亚洲精品久久久久中文字幕欢迎你| 免费试看一区| 在线亚洲电影| 亚洲欧美在线另类| 国产精品九九| 久久精品中文字幕一区| 久久岛国电影| 一区二区三区高清在线| 亚洲一区二区三区视频| 国产精品丝袜91| 久久精品噜噜噜成人av农村| 欧美专区18| 亚洲精品久久久久久久久久久久久 | 国产精品第一页第二页第三页| 亚洲高清毛片| 久久综合久久久久88| 亚洲日本欧美在线| 亚洲视频中文| 亚洲电影专区| 亚洲视频999| 欧美午夜精品久久久久免费视| 亚洲欧美偷拍卡通变态| 久久成人亚洲| 亚洲深夜福利| 久久精品国产免费观看| 最新国产精品拍自在线播放| 亚洲男人天堂2024| 亚洲黄一区二区| 一本久久知道综合久久| 牛牛国产精品| 亚洲欧美日韩成人高清在线一区| 久久国产日韩| 亚洲欧美大片| 欧美精品在线视频观看| 久久久久久久国产| 国产精品福利在线| 欧美日韩中文字幕精品| 亚洲第一网站| 国产欧美日韩综合一区在线观看 | 一区二区精品在线| 伊人久久婷婷色综合98网| 国产精品99久久99久久久二8| 亚洲国产精品传媒在线观看| 一区二区高清视频在线观看| 亚洲国产精品免费| 欧美成人综合在线| 国产亚洲高清视频| 制服诱惑一区二区| 欧美三区美女| 亚洲激情自拍| 亚洲黄网站在线观看| 久久精品91| 夜夜爽av福利精品导航| 久久久久久97三级| 久久久亚洲高清| 亚洲精选视频在线| 欧美国产日韩一区二区| 久久综合伊人77777| 国产亚洲a∨片在线观看| 久久久久久久91| 一本一本久久a久久精品综合妖精| 欧美在线一二三四区| 性娇小13――14欧美| 欧美日韩在线直播| 亚洲精品一二区| 在线亚洲一区二区| 午夜一级在线看亚洲| 免费成人美女女| 精品福利免费观看| 麻豆成人综合网| 亚洲激情小视频| 日韩亚洲欧美成人一区| 亚洲激情亚洲| 亚洲无线视频| 国产精品久久久久久久浪潮网站| 99综合视频| 久久国产手机看片| 好看的日韩视频| 久久综合给合久久狠狠色| 久久久久久97三级| 久久国产日韩| 最新国产成人在线观看| 欧美日本高清| 亚洲天堂男人| 久久精品一区二区三区四区| 黄色亚洲精品| 欧美成人综合在线| 亚洲天堂av电影| 久久全球大尺度高清视频| 亚洲国产高清aⅴ视频| 欧美日韩国产精品一区二区亚洲 | 久久久久成人精品| 亚洲国产精品毛片| 国产精品久久久一区麻豆最新章节| 欧美中文字幕在线视频| 99这里只有久久精品视频| 欧美亚日韩国产aⅴ精品中极品| 性色av一区二区三区红粉影视| 亚洲黄一区二区| 日韩午夜免费视频| 国产日韩欧美综合| 美女精品自拍一二三四| 亚洲午夜小视频| 久久久亚洲精品一区二区三区| 欧美国产激情二区三区| 亚洲一区二区三区免费观看| 一区二区三区在线免费观看| 欧美精品成人一区二区在线观看| 亚洲天堂久久| 国产中文一区| 欧美亚韩一区| 欧美激情影院| 久久一区欧美| 久久精品麻豆| 亚洲一区二区在线看| 欧美高清在线视频| 久久久久久久999精品视频| 亚洲免费观看在线视频| 激情欧美日韩| 国产欧美日韩在线| 国产精品久久久久av|