Пример #1
0
void Engine::Init()
{
	GUI gui;
	gui.Init();

	Effect effect;
	effect.Init();
}
Пример #2
0
	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;
	}
Пример #3
0
		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;
		}