本文整理汇总了C++中LPDIRECT3DDEVICE9::GetLight方法的典型用法代码示例。如果您正苦于以下问题:C++ LPDIRECT3DDEVICE9::GetLight方法的具体用法?C++ LPDIRECT3DDEVICE9::GetLight怎么用?C++ LPDIRECT3DDEVICE9::GetLight使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类LPDIRECT3DDEVICE9
的用法示例。
在下文中一共展示了LPDIRECT3DDEVICE9::GetLight方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1:
HRESULT HookIDirect3DDevice9::GetLight(LPVOID _this,
DWORD Index,
D3DLIGHT9* pLight)
{
LOG_API();
return pD3Dev->GetLight(Index, pLight);
}
示例2: Draw
//-----------------------------------------------------------------------------
// Name: CTiny::Draw()
// Desc: Renders this CTiny instace using the current animation frames.
//-----------------------------------------------------------------------------
HRESULT CTiny::Draw(D3DXMATRIXA16 *mxViewProj, bool bRenderShadow)
{
LPDIRECT3DDEVICE9 pDevice = this->m_pMA->GetDevice();
D3DLIGHT9 light;
pDevice->GetLight(0, &light);
// update the ViewProjection matric for the animation
ID3DXEffect* pMAEffect = m_pMA->GetEffect();
if( pMAEffect )
{
pMAEffect->SetMatrix( "g_mViewProj", mxViewProj );
pMAEffect->SetVector( "lhtDir", (D3DXVECTOR4 *)&(light.Direction));
}
SAFE_RELEASE( pMAEffect );
SAFE_RELEASE( pDevice);
if(bRenderShadow)
{
m_pMA->SetTechnique( "ShadowPass" );
}
else
{
m_pMA->SetTechnique( "Skinning20" );
// translate player
}
return m_pAI->Draw();
}