Ejemplo n.º 1
0
	void PreloadModels()
	{
		IAssetSystem* pAssetSystem = PerModuleInterface::g_pSystemTable->pAssetSystem;

		for (int i=0; i<EGO_COUNT; ++i)
		{
			std::string path = "/Models/"; //directories relative to asset dir
			path += m_GlobalParameters.go[i].model;
			IAURenderableMesh* pMesh = pAssetSystem->CreateRenderableMeshFromFile( path.c_str() );
			if (pMesh)
			{
				pAssetSystem->DestroyRenderableMesh(pMesh);
			}
		}
	}
	void PreloadModels()
	{
		IAssetSystem* pAssetSystem = PerModuleInterface::GetInstance()->GetSystemTable()->pAssetSystem;

		for (int i=0; i<EGO_COUNT; ++i)
		{
			std::string path = "..\\Assets\\Models\\";
			path += m_GlobalParameters.go[i].model;
			IAURenderableMesh* pMesh = pAssetSystem->CreateRenderableMeshFromFile( path.c_str() );
			if (pMesh)
			{
				pAssetSystem->DestroyRenderableMesh(pMesh);
			}
		}
	}