Beispiel #1
0
void Renderer::LoadTextures()
{
	TextureManager * textureManager = Engine::GetInstance()->GetTextureManager();

	for (TextureMappingList::iterator it = mTextureMapping.mMapping.begin(); it != mTextureMapping.mMapping.end(); ++it)
	{
		std::vector<TextureManager::LoadTextureGroupDesc> textureList;
		textureList.reserve(it->mTexInfoList.size());
		for (TexInfoPtrList::const_iterator it2 = it->mTexInfoList.begin(); it2 != it->mTexInfoList.end(); ++it2)
		{
			textureList.push_back(TextureManager::LoadTextureGroupDesc((*it2)->GetFilename(), (*it2)->mInvertY));
		}

		it->mTexture = textureManager->LoadTextureGroup(it->mTexInfoList.front()->GetGroupId(), textureList);
	}
}