本文整理汇总了C++中LPDIRECT3DDEVICE9::CreateAdditionalSwapChain方法的典型用法代码示例。如果您正苦于以下问题:C++ LPDIRECT3DDEVICE9::CreateAdditionalSwapChain方法的具体用法?C++ LPDIRECT3DDEVICE9::CreateAdditionalSwapChain怎么用?C++ LPDIRECT3DDEVICE9::CreateAdditionalSwapChain使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类LPDIRECT3DDEVICE9
的用法示例。
在下文中一共展示了LPDIRECT3DDEVICE9::CreateAdditionalSwapChain方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1:
HRESULT HookIDirect3DDevice9::CreateAdditionalSwapChain(LPVOID _this,
D3DPRESENT_PARAMETERS* pPresentationParameters,
IDirect3DSwapChain9** pSwapChain)
{
LOG_API();
return pD3Dev->CreateAdditionalSwapChain(pPresentationParameters, pSwapChain);
}
示例2: sizeof
HRESULT XD3DView::CreateView( HWND hWnd, LPDIRECT3DDEVICE9 pd3dDevice, D3DFORMAT backBufferFormat )
{
SafeRelease( &m_pd3dChain );
// CMainFrame *pMainFrm = g_pMainFrm;
m_hWnd = hWnd;
D3DPRESENT_PARAMETERS d3dpp;
ZeroMemory( &d3dpp, sizeof(d3dpp) );
d3dpp.Windowed = TRUE;
d3dpp.SwapEffect = D3DSWAPEFFECT_COPY;
// Use the current display mode.
// d3dpp.BackBufferFormat = g_pMainFrm->m_d3dpp.BackBufferFormat;
d3dpp.BackBufferFormat = backBufferFormat;
// m_hWnd contains child window handle
d3dpp.hDeviceWindow=m_hWnd;
// m_pSwapChain is IDirect3DSwapChain *
HRESULT hr = pd3dDevice->CreateAdditionalSwapChain( &d3dpp, &m_pd3dChain );
// Store render target surface desc
LPDIRECT3DSURFACE9 pBackBuffer = NULL;
// XBREAK( m_pd3dChain == NULL );
if( m_pd3dChain )
{
m_pd3dChain->GetBackBuffer( 0, D3DBACKBUFFER_TYPE_MONO, &pBackBuffer );
pBackBuffer->GetDesc( &m_d3dsdBackBuffer );
pBackBuffer->Release();
}
return S_OK;
}
示例3: GnDxRelease
bool GnDX9SwapChainBuffer::CreateBufferData(D3DPRESENT_PARAMETERS d3dpp, LPDIRECT3DDEVICE9 pDevice,
LPDIRECT3DSWAPCHAIN9& pSwapChain, LPDIRECT3DSURFACE9& pSurface)
{
HRESULT hr = S_OK;
if ( FAILED(hr = pDevice->CreateAdditionalSwapChain(&d3dpp, &pSwapChain)) )
return false;
if ( FAILED(pSwapChain->GetBackBuffer(0, D3DBACKBUFFER_TYPE_MONO, &pSurface)) )
{
GnDxRelease(pSwapChain);
return false;
}
return true;
}