本文整理汇总了C++中LPDIRECT3DDEVICE9::AddRef方法的典型用法代码示例。如果您正苦于以下问题:C++ LPDIRECT3DDEVICE9::AddRef方法的具体用法?C++ LPDIRECT3DDEVICE9::AddRef怎么用?C++ LPDIRECT3DDEVICE9::AddRef使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类LPDIRECT3DDEVICE9
的用法示例。
在下文中一共展示了LPDIRECT3DDEVICE9::AddRef方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: CBaseStateManager
CBaseStateManager( LPDIRECT3DDEVICE9 pDevice )
: m_lRef( 1UL ),
m_pDevice( pDevice ),
m_nTotalStateChanges( 0 ),
m_nTotalStateChangesPerFrame( 0 )
{
// Increment the reference count on the device, because a pointer to it has
// been copied for later use
m_pDevice->AddRef();
m_wszFrameStats[0] = 0;
}
示例2:
HRESULT KG3DGraphicsEngine::UnInit()
{
HRESULT hr = E_FAIL;
HRESULT hrResult = E_FAIL;
if (m_pDeviceCallback)
{
hr = m_pDeviceCallback->OnDestroyDevice();
KGLOG_COM_PROCESS_ERROR(hr);
}
hr = UnInitVIM3D();
KGLOG_COM_PROCESS_ERROR(hr);
int k = g_pd3dDevice->AddRef();
k = g_pd3dDevice->Release();
VERIFY_RELEASE(g_pd3dDevice); //如果到这里,就表明有资源没有释放干净
VERIFY_RELEASE(m_pD3D);
hrResult = S_OK;
Exit0:
return hrResult;
}
示例3:
ULONG HookIDirect3DDevice9::AddRef(LPVOID _this)
{
LOG_API();
return pD3Dev->AddRef();
}