本文整理汇总了C++中ParticleSystem::DrawSystem方法的典型用法代码示例。如果您正苦于以下问题:C++ ParticleSystem::DrawSystem方法的具体用法?C++ ParticleSystem::DrawSystem怎么用?C++ ParticleSystem::DrawSystem使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ParticleSystem
的用法示例。
在下文中一共展示了ParticleSystem::DrawSystem方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: UpdateSystems
void ParticleSystemManager::UpdateSystems( float frametime ) //LRC - now with added time!
{
// gEngfuncs.pTriAPI->RenderMode(kRenderTransAdd);
// gEngfuncs.pTriAPI->RenderMode(kRenderTransAlpha);
ParticleSystem* pSystem;
ParticleSystem* pLast = NULL;
ParticleSystem*pLastSorted = NULL;
cl_entity_t *localPlayer = gEngfuncs.GetLocalPlayer();
// vec3_t normal, forward, right, up;
// gEngfuncs.GetViewAngles((float*)normal);
// AngleVectors(normal,forward,right,up);
//SortSystems();
pSystem = m_pFirstSystem;
while( pSystem )
{
if( pSystem->UpdateSystem(frametime, /*right, up,*/ localPlayer->curstate.messagenum) )
{
pSystem->DrawSystem();
pLast = pSystem;
pSystem = pSystem->m_pNextSystem;
}
else // delete this system
{
if (pLast)
{
pLast->m_pNextSystem = pSystem->m_pNextSystem;
delete pSystem;
pSystem = pLast->m_pNextSystem;
}
else // deleting the first system
{
m_pFirstSystem = pSystem->m_pNextSystem;
delete pSystem;
pSystem = m_pFirstSystem;
}
}
}
gEngfuncs.pTriAPI->RenderMode(kRenderNormal);
}
示例2: UpdateSystems
void ParticleSystemManager::UpdateSystems( void )
{
static float fOldTime, fTime;
fOldTime = fTime;
fTime = GetClientTime();
float frametime = fTime - fOldTime;
ParticleSystem* pSystem;
ParticleSystem* pLast = NULL;
ParticleSystem*pLastSorted = NULL;
SortSystems();
pSystem = m_pFirstSystem;
while( pSystem )
{
if( pSystem->UpdateSystem( frametime ))
{
pSystem->DrawSystem();
pLast = pSystem;
pSystem = pSystem->m_pNextSystem;
}
else // delete this system
{
if (pLast)
{
pLast->m_pNextSystem = pSystem->m_pNextSystem;
delete pSystem;
pSystem = pLast->m_pNextSystem;
}
else // deleting the first system
{
m_pFirstSystem = pSystem->m_pNextSystem;
delete pSystem;
pSystem = m_pFirstSystem;
}
}
}
g_engfuncs.pTriAPI->RenderMode(kRenderNormal);
}