How to use Direct3D 9 under Direct3D 11? (FULLSCREEN problem)

EDN Admin

Well-known member
Joined
Aug 7, 2010
Messages
12,794
Location
In the Machine
<span style="font-size:9.5pt; line-height:115%; font-family:Consolas; color:green /*<br/>
Failed to create IDirect3DDevice9 Interface: hr = D3DERR_DEVICELOST<br/>
<span style="font-size:9.5pt; line-height:115%; font-family:Consolas <br/>
<span style="color:green How to create a second Device (D3D9) such that first Device (D3D11 or D3D9) in FULLSCREEN is already created? The objective is to use D3D9 under D3D11.<br/>
<br/>
<span style="color:green Remark: PIX doesnt support D3DDEVTYPE_NULLREF (D3D9), therefore itâs not a solution.<br/>
<span> PIX is very important for me in order to experiment the assembly architecture of the Shaders.<br/>
----------------------------------------------------------------------------------------------------<br/>
*/<br/>
<br/>
[...]<span style="font-size:12pt; line-height:115%; font-family:"Times New Roman","serif" <br/>
<span style="font-size:9.5pt; line-height:115%; font-family:Consolas <br/>
D3DDISPLAYMODE Mode;<br/>
<span style="color:blue this->D3D9_pDirect3D->GetAdapterDisplayMode(0, &Mode);<br/>
D3DPRESENT_PARAMETERS pp;<br/>
ZeroMemory(&pp, <span style="color:blue sizeof(pp));<br/>
<br/>
pp.BackBufferWidth = Mode.Width;<br/>
pp.BackBufferHeight = Mode.Height;<br/>
pp.BackBufferFormat = Mode.Format;<br/>
pp.BackBufferCount = 1;<br/>
pp.SwapEffect = D3DSWAPEFFECT_COPY;<br/>
pp.Windowed = FALSE;<br/>
pp.FullScreen_RefreshRateInHz = Mode.RefreshRate;<br/>
<br/>
<span style="color:blue if(FAILED( hr = <span style="color:blue this->D3D9_pDirect3D->CreateDevice(D3DADAPTER_DEFAULT, D3DDEVTYPE_HAL,<br/>

<span style="color:blue this->D3D9_hWnd,<br/>

D3DCREATE_HARDWARE_VERTEXPROCESSING,<br/>

&pp, &<span style="color:blue this->D3D9_pd3dDevice) ))<br/>
return hr;<br/>
<br/>
[...]

View the full article
 
Back
Top