void Engine::Init() { GUI gui; gui.Init(); Effect effect; effect.Init(); }
Effect* EffectFactory::CreateEffect(const std::string anEffectName, const std::string aFileName, eVertexType aVertexType, const bool anIsUsingAlpha) { Effect* newEffect = new Effect(); newEffect->Init(aFileName, aVertexType, myDevice); newEffect->SetIsUsingAlpha(anIsUsingAlpha); myEffects.Insert(anEffectName, newEffect); myEffectNames.Add(anEffectName); return newEffect; }
Effect* EffectsManager::CreateEffect(const char*pKey, const char* i_pVSfilePath, const char* i_pFSfilePath, uint32_t renderState) { Effect* pEffect = new Effect(); bool result = pEffect->Init(i_pVSfilePath, i_pFSfilePath, renderState); if (!result) { SAFE_DELETE(pEffect); return nullptr; } _effectManager.insert(std::pair<const char*, Effect*>(_strdup(pKey), pEffect)); return pEffect; }