MCPcopy Create free account
hub / github.com/OGSR/OGSR-Engine / Compile

Method Compile

ogsr_engine/Layers/xrRender/ParticleEffect.cpp:194–216  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

192}
193
194BOOL CParticleEffect::Compile(CPEDef* def)
195{
196 m_Def = def;
197
198 if (m_Def)
199 {
200 // refresh shader
201 RefreshShader();
202
203 // append actions
204 IReader F(m_Def->m_Actions.pointer(), m_Def->m_Actions.size());
205
206 ParticleManager()->LoadActions(m_HandleActionList, F, m_Def->m_copFormat);
207 ParticleManager()->SetMaxParticles(m_HandleEffect, m_Def->m_MaxParticles);
208 ParticleManager()->SetCallback(m_HandleEffect, OnEffectParticleBirth, OnEffectParticleDead, this, 0);
209
210 // time limit
211 if (m_Def->m_Flags.is(CPEDef::dfTimeLimit))
212 m_fElapsedLimit = m_Def->m_fTimeLimit;
213 }
214
215 return TRUE;
216}
217
218void CParticleEffect::SetBirthDeadCB(PAPI::OnBirthParticleCB bc, PAPI::OnDeadParticleCB dc, void* owner, u32 p) const
219{

Callers

nothing calls this directly

Calls 6

pointerMethod · 0.80
LoadActionsMethod · 0.80
SetMaxParticlesMethod · 0.80
isMethod · 0.80
sizeMethod · 0.45
SetCallbackMethod · 0.45

Tested by

no test coverage detected