コード例 #1
0
ファイル: GroundFog.cpp プロジェクト: ghoulsblade/vegaogre
	void GroundFog::findFogPassesByName (const Ogre::String& passName) {
		Ogre::MaterialManager *matManager = Ogre::MaterialManager::getSingletonPtr();
		Ogre::MaterialManager::ResourceMapIterator matIt = matManager->getResourceIterator();
		while (matIt.hasMoreElements()) {
			Ogre::MaterialPtr mat = matIt.getNext();
			Ogre::Material::TechniqueIterator techIt = mat->getTechniqueIterator();
			while (techIt.hasMoreElements()) {
				Ogre::Technique *tech = techIt.getNext();
				Ogre::Technique::PassIterator passIt = tech->getPassIterator();
				while (passIt.hasMoreElements()) {
					Ogre::Pass *pass = passIt.getNext();
					if (pass->getName() == passName) {
						mPasses.insert(pass);
					}
				}
			}
		}
		forceUpdate();
	}
コード例 #2
0
ファイル: GroundFog.cpp プロジェクト: sajty/ember
	void GroundFog::findFogPassesByName (const Ogre::String& passName) {
		Ogre::MaterialManager *matManager = Ogre::MaterialManager::getSingletonPtr();
		Ogre::MaterialManager::ResourceMapIterator matIt = matManager->getResourceIterator();
		while (matIt.hasMoreElements()) {
#if (OGRE_VERSION < ((1 << 16) | (9 << 8) | 0))
            Ogre::MaterialPtr mat = matIt.getNext();
#else
            Ogre::MaterialPtr mat = Ogre::static_pointer_cast<Ogre::Material>(matIt.getNext());
#endif
			for (Ogre::Technique* tech : mat->getTechniques()) {
				for (auto* pass : tech->getPasses()) {
					if (pass->getName() == passName) {
						mPasses.insert(pass);
					}
				}
			}
		}
		forceUpdate();
	}
コード例 #3
0
ファイル: GroundFog.cpp プロジェクト: Chimangoo/ember
	void GroundFog::findFogPassesByName (const Ogre::String& passName) {
		Ogre::MaterialManager *matManager = Ogre::MaterialManager::getSingletonPtr();
		Ogre::MaterialManager::ResourceMapIterator matIt = matManager->getResourceIterator();
		while (matIt.hasMoreElements()) {
#if (OGRE_VERSION < ((1 << 16) | (9 << 8) | 0))
            Ogre::MaterialPtr mat = matIt.getNext();
#else
            Ogre::MaterialPtr mat = matIt.getNext().staticCast<Ogre::Material>();
#endif
			Ogre::Material::TechniqueIterator techIt = mat->getTechniqueIterator();
			while (techIt.hasMoreElements()) {
				Ogre::Technique *tech = techIt.getNext();
				Ogre::Technique::PassIterator passIt = tech->getPassIterator();
				while (passIt.hasMoreElements()) {
					Ogre::Pass *pass = passIt.getNext();
					if (pass->getName() == passName) {
						mPasses.insert(pass);
					}
				}
			}
		}
		forceUpdate();
	}