void RenderingContext::ApplyBatch( IRenderBatch* val ) { SetBatch(val); if (mBatch!=nullptr) { mBatch->Apply(); UpdateShaderVariables(); } }
FireworkEffect::FireworkEffect(const float &fScale, const VECTOR3 &vPos) { Init(); m_fScale = fScale; m_vSource = vPos; SetBatch(gParticleManager()->RequestBatch()); Start(); }
SparkEffect::SparkEffect(const float &fScale, Node *pSourceNode, VECTOR3 vDir) { Init(); m_fScale = fScale; if (m_fScale < 0.35f) { m_fScale = 0.35f; } m_vSource = pSourceNode->m_PosQuat.pos; m_vDir.x = -vDir.x; //dir is opposite of where the object was traveling. m_vDir.y = -vDir.y; m_vDir.z = 0.0f; NormalizeVECTOR3(m_vDir); SetBatch(gParticleManager()->RequestBatch()); Start(); }