//-------------------------------------------------------------------------------------------------
ALVR_RESULT D3DHelperLateLatch::CreateConstantBuffer()
{
    ALVR_RESULT res = ALVR_OK;

    Locker lock(&m_Sect);

    m_pLateLatchBufferLeft.Release();
    m_pLateLatchBufferRight.Release();

    res = g_pLvrDevice->CreateLateLatchConstantBufferD3D11(sizeof(ConstantBuffer), 1024, 0, &m_pLateLatchBufferLeft);
    CHECK_ALVR_ERROR_RETURN(res, L"CreateLateLatchConstantBufferD3D11() failed");


    res = g_pLvrDevice->CreateLateLatchConstantBufferD3D11(sizeof(ConstantBuffer), 1024, 0, &m_pLateLatchBufferRight);
    CHECK_ALVR_ERROR_RETURN(res, L"CreateLateLatchConstantBufferD3D11() failed");


    return ALVR_OK;
}