本文整理汇总了C++中D3DPipelineManager::ReleaseD3D方法的典型用法代码示例。如果您正苦于以下问题:C++ D3DPipelineManager::ReleaseD3D方法的具体用法?C++ D3DPipelineManager::ReleaseD3D怎么用?C++ D3DPipelineManager::ReleaseD3D使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类D3DPipelineManager
的用法示例。
在下文中一共展示了D3DPipelineManager::ReleaseD3D方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: changed
// static
HRESULT D3DPipelineManager::HandleAdaptersChange(HMONITOR *pHMONITORs, UINT monNum)
{
HRESULT res = S_OK;
BOOL bResetD3D = FALSE, bFound;
D3DPipelineManager *pMgr = D3DPipelineManager::GetInstance();
RETURN_STATUS_IF_NULL(pHMONITORs, E_FAIL);
if (pMgr == NULL) {
// NULL pMgr is valid when the pipeline is not enabled or if it hasn't
// been created yet
return S_OK;
}
RETURN_STATUS_IF_NULL(pMgr->pAdapters, E_FAIL);
RETURN_STATUS_IF_NULL(pMgr->pd3d9, E_FAIL);
J2dTraceLn(J2D_TRACE_INFO, "D3DPPLM::HandleAdaptersChange");
if (monNum != pMgr->adapterCount) {
J2dTraceLn2(J2D_TRACE_VERBOSE,
" number of adapters changed (old=%d, new=%d)",
pMgr->adapterCount, monNum);
bResetD3D = TRUE;
} else {
for (UINT i = 0; i < pMgr->adapterCount; i++) {
HMONITOR hMon = pMgr->pd3d9->GetAdapterMonitor(i);
if (hMon == (HMONITOR)0x0) {
J2dTraceLn1(J2D_TRACE_VERBOSE, " adapter %d: removed", i);
bResetD3D = TRUE;
break;
}
bFound = FALSE;
for (UINT mon = 0; mon < monNum; mon++) {
if (pHMONITORs[mon] == hMon) {
J2dTraceLn3(J2D_TRACE_VERBOSE,
" adapter %d: found hmnd[%d]=0x%x", i, mon, hMon);
bFound = TRUE;
break;
}
}
if (!bFound) {
J2dTraceLn2(J2D_TRACE_VERBOSE,
" adapter %d: could not find hmnd=0x%x "\
"in the list of new hmnds", i, hMon);
bResetD3D = TRUE;
break;
}
}
}
if (bResetD3D) {
J2dTraceLn(J2D_TRACE_VERBOSE, " adapters changed: resetting d3d");
pMgr->ReleaseD3D();
res = pMgr->InitD3D();
}
return res;
}