本文整理汇总了C++中microsoft::wrl::ComPtr::End方法的典型用法代码示例。如果您正苦于以下问题:C++ ComPtr::End方法的具体用法?C++ ComPtr::End怎么用?C++ ComPtr::End使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类microsoft::wrl::ComPtr
的用法示例。
在下文中一共展示了ComPtr::End方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: EndRender
void CRenderCaptureDX::EndRender()
{
// send commands to the GPU queue
auto deviceResources = DX::DeviceResources::Get();
deviceResources->FinishCommandList();
Microsoft::WRL::ComPtr<ID3D11DeviceContext> pContext = deviceResources->GetImmediateContext();
pContext->CopyResource(m_copyTex.Get(), m_renderTex.Get());
if (m_query)
{
pContext->End(m_query.Get());
}
if (m_flags & CAPTUREFLAG_IMMEDIATELY)
SurfaceToBuffer();
else
SetState(CAPTURESTATE_NEEDSREADOUT);
}
示例2: FlipVisual
// Apply a 3D flip for hit-tested tile visual
HRESULT Application::FlipVisual(int visualIndex)
{
HRESULT hr = S_OK;
Microsoft::WRL::ComPtr<IDCompositionAnimation> dcompAngleAnimation;
if (SUCCEEDED(hr))
{
hr = _dcompDevice->CreateAnimation(&dcompAngleAnimation);
}
if (SUCCEEDED(hr))
{
hr = dcompAngleAnimation->AddCubic(0.0, 0.0f, 180.0f, 0.0f, 0.0f);
}
if (SUCCEEDED(hr))
{
hr = dcompAngleAnimation->End(1.0, 180.0f);
}
Microsoft::WRL::ComPtr<IDCompositionRotateTransform3D> dcompFlipTransform;
if (SUCCEEDED(hr))
{
hr = _dcompDevice->CreateRotateTransform3D(&dcompFlipTransform);
}
if (SUCCEEDED(hr))
{
hr = dcompFlipTransform->SetCenterX(1.0f * _hWndClientWidth / 8.0f);
}
if (SUCCEEDED(hr))
{
hr = dcompFlipTransform->SetCenterY(1.0f * _hWndClientHeight / 8.0f);
}
if (SUCCEEDED(hr))
{
hr = dcompFlipTransform->SetCenterZ(0.0f);
}
if (SUCCEEDED(hr))
{
hr = dcompFlipTransform->SetAxisX(0.0f);
}
if (SUCCEEDED(hr))
{
hr = dcompFlipTransform->SetAxisY(1.0f);
}
if (SUCCEEDED(hr))
{
hr = dcompFlipTransform->SetAxisZ(0.0f);
}
if (SUCCEEDED(hr))
{
hr = dcompFlipTransform->SetAngle(dcompAngleAnimation.Get());
}
if (SUCCEEDED(hr))
{
hr = _dcompTileVisuals[visualIndex]->SetEffect(dcompFlipTransform.Get());
}
if (SUCCEEDED(hr))
{
hr = _dcompDevice->Commit();
}
return hr;
}