OnVertexBufferDestroy

From Multi Theft Auto: Wiki
Revision as of 13:42, 14 May 2017 by Xtravax (talk | contribs) (Created page with "<pageclass subcaption="C++ Function"></pageclass> This C++ Function is found inside of CAdditionalVertexStreamManager. It serves as an event of when vertex buffer gets d...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

This C++ Function is found inside of CAdditionalVertexStreamManager.

It serves as an event of when vertex buffer gets destroyed.

It can be found in Client/Client Core/Sources/CAdditionalVertexStreamManager.cpp in Visual Studio.

Required Arguments

  • pStreamData1: Pointer to the IDirect3DVertexBuffer9 type.

Code

void CAdditionalVertexStreamManager::OnVertexBufferDestroy ( IDirect3DVertexBuffer9* pStreamData1  )
{
    SAdditionalStreamInfo* pAdditionalInfo = GetAdditionalStreamInfo ( pStreamData1 );
    if ( pAdditionalInfo )
    {
        pAdditionalInfo->pStreamData->Release ();
        pAdditionalInfo->pVertexDeclaration->Release ();
        MapRemove ( m_AdditionalStreamInfoMap, pStreamData1 );
    }
}

See Also