将DirectX 9.0c转换为DirectX 11错误->开始

时间:2019-06-17 10:08:02

标签: c++11 directx directx-11 directx-9

尝试将DirectX 9.0c转换为DirectX 11 当我使用-> BeginPass 而使用旧的-> Pass 时,出现错误。

错误:cPasses

m_pMask-> Begin(&cPasses,0);

这是显示的返回值

HRESULT CShader::Pass(UINT nPass)
{
    HRESULT ret = m_pMask->BeginPass(nPass);
    if (ret == D3D_OK)
        ret = m_pMask->CommitChanges();
    m_pMask->EndPass();
    return ret;
}

{
    m_pMask->SetTechnique(m_pMask->GetTechniqueByName("RenderMapName"));

    UINT cPasses;
    m_pMask->Begin(&cPasses, 0);
    for (UINT iPass = 0; iPass < cPasses; iPass++)
    {
        Pass(iPass);
        m_pd3dDevice->DrawPrimitiveUP( D3DPT_TRIANGLESTRIP, 2, vertex, sizeof( TEXTUREVERTEX ) );
    }
    m_pMask->End();
}

0 个答案:

没有答案