多渲染窗口的實現

 

多渲染窗口的實現

  DX9通過SwapChain來實現,每個渲染窗口對應一個SwapChain

  1)創建 IDirect3DDevice::CreateSwapChain()

  2)改變Render Targeta back buffer

       獲得指定SwapChainBackBuffer IDirect3DSwapChain9::GetBackBuffer()

指定目標渲染區域:IDirect3DDevice9::SetRenderTarget()

  3)渲染

void RTD3D::EndRendering()<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" />

{

     m_pD3DDevice->EndScene();

     m_pChain[2]->Present(NULL, NULL, m_hWnd3D[2], NULL, 0);

     return;

}

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章