Hi!
What is the best , or is there a, method for getting a list of all of the materials loaded into ogre. I tried using :
Ogre::MaterialManager::getSingleton().getResourceIterator().getNext()->getName();. But this returns "DefualtSettings." Any help would be appreciated.
Thanks,
snipexv
What is the best method for getting a list of material names
- snipexv
- Halfling
- Posts: 66
- Joined: Thu Jan 27, 2005 3:20 pm
- sinbad
- OGRE Retired Team Member

- Posts: 19269
- Joined: Sun Oct 06, 2002 11:19 pm
- Location: Guernsey, Channel Islands
- x 67
- Contact:
-
nfz
- OGRE Retired Team Member

- Posts: 1263
- Joined: Wed Sep 24, 2003 4:00 pm
- Location: Halifax, Nova Scotia, Canada
here is an example:
Code: Select all
Ogre::ResourceManager::ResourceMapIterator materialIterator =
Ogre::MaterialManager::getSingleton().getResourceIterator();
while (materialIterator.hasMoreElements())
{
cbobox->addItem(nfz::createListItem( static_cast<Ogre::MaterialPtr>
(materialIterator.peekNextValue())->getName(), 0));
materialIterator.moveNext();
}
Last edited by nfz on Sun Jul 10, 2005 11:15 pm, edited 1 time in total.