I have many compositors defined in a single file, and they use materials that I ALSO defined in the same file (deferred.compositor). I decided to make a 2nd file in the same folder for some new compositors I am writing (Bloom.compositor). One of the compositors in the 2nd file is using a material defined in the 1st file. When I try to use the compositor in the 2nd file, OGRE logs a message saying that no material exists for it.
I know the material exists because I have other compositors using it with no problems. I stepped through the ResourceGroupManager code. I can see the material property being assigned correctly to the render_quad target pass, so the compositor actually does have a good material.CompositorChain: Compositor final_bloom_brightPass has no supported techniques.
Unfortunately, I also noticed that the new (2nd) script is compiled BEFORE the old (1st) script. Maybe this happens alphabetically? [edit] Yes, yes it does. [/edit]
I think the call to parse the scripts and declare resources should be separated from when the scripts are compiled/translated so that the resource dependencies actually exist.
It would also be helpful if the translator would log what material did not exist. This could be done if OgreScriptTranslator::Translate() called mPass->setMaterial(matPtr) instead of mPass->setMaterialName(string). In fact, it would probably be best if the string function was removed.
I'm using Rev 2930 from the Sinbad repository. Thanks for any help.