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

關于DirectX使用的一些注意事項

1.關于創建Direct3D設備對象
   創建Direct3D設備對象時,需要先創建Direct3D對象,然后再調用Direct3D對象的接口函數IDirect3D9::CreateDevice創建Direct3D設備對象。通過同一個Direct3D對象創建的所有Direct3D設備對象共享相同的物理資源(顯卡)。因為共享同一硬件,所以如果通過一個Direct3D對象創建多個Direct3D渲染設備對象會明顯降低系統性能。
   在創建Direct3D設備對象之前,還需要先初始化D3DPRESENT_PARAMENTERS結構,該結構用于創建Direct3D設備對象。此結構將會影響Direct3D設備的顯示方法。
      

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. 
      幾個重要的參數加以解釋說明一下,其中BackBufferWidth和BackBufferHeight指定后臺緩存區的寬高(以像素為單位)。如果圖形以窗口方式顯示并且該成員變量被設置為0,則系統自動使用顯示窗口客戶區的寬高作為后臺緩沖區的寬高。BackBufferCount指定后臺緩沖區的數量。該值可以為0、1、2、3,其中0和1時都表示創建一個后臺緩沖區。通常使用一個后臺緩沖區和一個主緩存,主緩存將其顯示在屏幕上。

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

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

導航

統計

常用鏈接

留言簿

隨筆分類

隨筆檔案

文章檔案

牛人博客

搜索

積分與排名

最新評論

閱讀排行榜

青青草原综合久久大伊人导航_色综合久久天天综合_日日噜噜夜夜狠狠久久丁香五月_热久久这里只有精品
  • <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>
            欧美在线播放一区二区| 国产欧美精品xxxx另类| 亚洲欧美精品在线观看| 99视频热这里只有精品免费| 99re6这里只有精品| 亚洲三级免费| 亚洲国产日韩欧美在线99 | 欧美另类一区二区三区| 欧美精品一区二区高清在线观看| 欧美激情亚洲一区| 国产精品多人| 国内久久视频| 久久久久久久高潮| 久久久九九九九| 欧美精品在线一区二区| 国产精品日韩欧美| 国产精品亚洲人在线观看| 激情六月婷婷综合| 亚洲天堂成人| 欧美成人精品福利| 亚洲女性喷水在线观看一区| 久久婷婷激情| 国产精品一区久久| 日韩亚洲精品视频| 久久精品亚洲一区二区| 亚洲激情网站| 久久国产精品99久久久久久老狼| 欧美高清视频一区二区| 国产日韩欧美中文在线播放| 亚洲美女精品久久| 久久久久**毛片大全| 亚洲理论在线观看| 久久―日本道色综合久久| 国产精品白丝jk黑袜喷水| 亚洲国产精品第一区二区| 欧美一区二区日韩| 日韩一区二区精品| 欧美成人在线免费视频| 国产一区二区三区在线观看视频| 亚洲无毛电影| 亚洲国产视频一区二区| 久久九九久精品国产免费直播| 国产精品久久久久久久久借妻| 亚洲精品久久久蜜桃| 久久综合精品一区| 久久成人精品| 国产一区二区欧美| 久久九九电影| 午夜视频一区在线观看| 国产精品扒开腿做爽爽爽视频 | 欧美大胆成人| 亚洲人成啪啪网站| 亚洲电影专区| 男人插女人欧美| 在线免费观看成人网| 久久久久久精| 久久精品动漫| 尤物yw午夜国产精品视频| 久久天堂av综合合色| 欧美一区二区三区日韩视频| 国产午夜精品一区理论片飘花| 亚洲欧洲av一区二区| 亚洲午夜电影网| 国产精品中文字幕欧美| 亚洲欧美日韩一区| 亚洲欧美日韩第一区| 国产欧美日韩91| 久久夜色精品国产| 久久在线视频在线| 亚洲巨乳在线| 一区二区三区视频在线观看| 亚洲激情在线| 欧美天堂亚洲电影院在线观看| 一区二区三区视频在线观看| 中日韩男男gay无套 | 亚洲精品欧美激情| 亚洲精品社区| 国产乱码精品一区二区三| 久久久www成人免费无遮挡大片 | 久久人人爽国产| 国产精品99久久久久久人| 亚洲免费在线观看视频| 精久久久久久| 一本久久精品一区二区| 国内精品久久久久影院薰衣草| 免费视频久久| 欧美性猛片xxxx免费看久爱| 久久av在线看| 美女网站久久| 亚洲无线视频| 久久亚洲国产精品日日av夜夜| 这里只有精品视频在线| 欧美制服丝袜第一页| 亚洲啪啪91| 午夜精品免费视频| 亚洲精品国产系列| 亚洲欧美综合一区| 99在线|亚洲一区二区| 午夜免费日韩视频| 夜夜嗨av一区二区三区四区| 欧美一区二区成人6969| 99国产精品一区| 欧美一区二区福利在线| 一本一本久久a久久精品综合妖精 一本一本久久a久久精品综合麻豆 | 久久久久久网| 欧美日韩另类丝袜其他| 久久一区激情| 国产精品jizz在线观看美国| 噜噜噜91成人网| 国产精品热久久久久夜色精品三区 | 国模一区二区三区| 一区二区三区四区在线| 亚洲国产日韩一区| 久久国内精品自在自线400部| 亚洲亚洲精品在线观看| 欧美国产日韩一区| 欧美1区2区视频| 狠狠色丁香久久婷婷综合丁香| 一卡二卡3卡四卡高清精品视频| 亚洲风情亚aⅴ在线发布| 久久国产精品久久精品国产| 欧美精品www在线观看| 久久最新视频| 黄色工厂这里只有精品| 午夜精品久久| 香蕉乱码成人久久天堂爱免费 | 欧美成人免费视频| 免费视频一区二区三区在线观看| 国产精品综合av一区二区国产馆| 一二三区精品福利视频| 中文亚洲欧美| 欧美视频精品在线观看| 日韩视频一区二区三区在线播放免费观看| 影音先锋另类| 久久全球大尺度高清视频| 噜噜噜久久亚洲精品国产品小说| 国产专区精品视频| 久久久国产精品一区| 久久久久在线| 激情成人综合| 久久综合九色综合久99| 欧美成人69av| 亚洲毛片网站| 欧美日韩精品久久久| 夜夜嗨av一区二区三区四季av| 亚洲综合电影一区二区三区| 国产精品日韩欧美综合| 午夜伦理片一区| 久久综合给合久久狠狠色 | 久久大综合网| 一区在线免费| 欧美成人自拍视频| 99在线|亚洲一区二区| 亚洲欧美在线另类| 国产视频久久久久久久| 久久久久久久97| 亚洲激情欧美| 篠田优中文在线播放第一区| 国产一区二区0| 免费不卡亚洲欧美| 一区二区三区 在线观看视频| 欧美一区二区成人6969| 激情文学一区| 欧美日韩免费观看一区三区| 午夜国产不卡在线观看视频| 免费观看亚洲视频大全| 日韩视频一区二区三区| 国产精品久久久免费| 久久精品首页| 一区二区不卡在线视频 午夜欧美不卡'| 销魂美女一区二区三区视频在线| 韩国女主播一区| 欧美日韩亚洲一区二区三区四区| 欧美亚洲免费在线| 亚洲另类自拍| 久久亚洲综合色| 亚洲一区二区三区乱码aⅴ蜜桃女| 国产日韩欧美制服另类| 欧美精品1区| 久久精品女人的天堂av| 一本高清dvd不卡在线观看| 久久嫩草精品久久久久| 国产精品99久久99久久久二8| 在线观看中文字幕亚洲| 国产欧美二区| 国产精品久久久久久久久久久久| 亚洲激情成人在线| 久久精品成人一区二区三区蜜臀| 亚洲精品色婷婷福利天堂| 国产视频一区三区| 国产精品盗摄久久久| 欧美va亚洲va香蕉在线| 欧美在线一级视频| 亚洲尤物在线| 在线亚洲激情| a4yy欧美一区二区三区| 亚洲国产精品免费| 欧美1区2区3区| 美女视频一区免费观看| 久久精品成人一区二区三区|