My code used to work on v0.15. It fails on v1.0 RC now.
I am sure the material file is there, and the name is correct.
I guess Ogre doesn't load the material for me.
The log file shows the error.
Error #: 7
Function: BillboardSet::setMaterialName
Description: Could not find material Examples/FlyingLightMaterial.
File: d:\dragon\ogre\ogrenew\ogremain\src\ogrebillboardset.cpp
Line: 271
Stack unwinding: <<beginning of stack>>
My code.
Code: Select all
BillboardSet * m_pLightBbs = m_pSceneMgr->createBillboardSet("LightBillboardSet");
m_pLightBbs->setMaterialName("Examples/FlyingLightMaterial"); My setup resource code similar to ExampleApplication:
Code: Select all
void OgreEngine::SetupResources()
{
// Load resource paths from config file
ConfigFile cf;
cf.load("resources.cfg");
// Go through all settings in the file
ConfigFile::SettingsIterator i = cf.getSettingsIterator("General");
ResourceGroupManager::getSingleton().initialiseAllResourceGroups();
String typeName, archName;
while (i.hasMoreElements())
{
typeName = i.peekNextKey();
archName = i.getNext();
ResourceGroupManager::getSingleton().addResourceLocation(archName, typeName, "general");
}
}Code: Select all
[Bootstrap]
Zip=./Media/packs/OgreCore.zip
Zip=./Media/packs/skybox.zip
# Resource locations to be added to the default path
[General]
# !!! Application specific
FileSystem = Media/Terrains
FileSystem= ./Media/dragonmodels
#Ogre Directories
FileSystem=./Media
FileSystem=./Media/models
FileSystem=./Media/fonts
FileSystem=./Media/overlays
FileSystem=./Media/materials/programs
FileSystem=./Media/materials/scripts
FileSystem=./Media/materials/texturesThank you in advance.
Steve
