DX8のIDirect3DDevie8 :: CopyRectsをDirectX9に移植するにはどうすればよいですか?それが働いていた場合HERESに "交換" のコード... IDirect3DDevice8 :: CopyRects in DirectX 9? C++
StretchRect(m_pD3DSurface, NULL, pBackBuffer, NULL, D3DTEXF_NONE);
がD3Dデバッガを実行した
//clear the window to blue
m_pD3DDevice->Clear (0, NULL, D3DCLEAR_TARGET, D3DCOLOR_XRGB(0,0,255), 1.0f, 0);
//get back buffer
LPDIRECT3DSURFACE9 pBackBuffer;
m_pD3DDevice->GetBackBuffer(0, 0, D3DBACKBUFFER_TYPE_MONO, &pBackBuffer);
//start rendering
m_pD3DDevice->BeginScene();
//copy the surface to the screen
m_pD3DDevice->CopyRects (m_pD3DSurface, NULL, 0, pBackBuffer, NULL);
//end rendering
m_pD3DDevice->EndScene();
//present the rendered scene to the screen
m_pD3DDevice->Present(NULL, NULL, NULL, NULL);
...私は、関数(stretchRect)を発見したが、動作するようには思えません
Direct3D9: (INFO) :======================= Hal SWVP device selected
Direct3D9: (INFO) :HalDevice Driver Style 9
Direct3D9: :BackBufferCount not specified, considered default 1
Direct3D9: :DoneExclusiveMode
Direct3D9: (INFO) :Failed to create driver indexbuffer
Direct3D9: (INFO) :Using P4 PSGP
Direct3D9: (ERROR) :This format is not supported for offscreen plain surfaces. CreateOffscreenPlainSurface fails.
Game Library.exe has triggered a breakpoint
Direct3D9: (ERROR) :Invalid source surface interface specified. StretchRect fails CreateOffscreenPlainSurface fails.
なぜIDirect3DDevice8 :: CopyRectsを使用できませんでしたか? コードがDX8用に書かれている場合は、DX8を使用してください。 IDirect3D8 :: CreateDevice():) – Pod