Absolutely. See Ogre::Pass::addTextureUnitState()/removeTextureUnitState(). The easiest way to do that would be to add the texture unit to the material script and remove it when your application initializes. Then add it back and remove as needed. Be sure to dispose the texture unit on exit if you own it (as opposed to the material pass owning it). This way you you don't need to write the code creating it from scratch.
bstone wrote:Absolutely. See Ogre::Pass::addTextureUnitState()/removeTextureUnitState(). The easiest way to do that would be to add the texture unit to the material script and remove it when your application initializes. Then add it back and remove as needed. Be sure to dispose the texture unit on exit if you own it (as opposed to the material pass owning it). This way you you don't need to write the code creating it from scratch.
bstone wrote:Absolutely. See Ogre::Pass::addTextureUnitState()/removeTextureUnitState(). The easiest way to do that would be to add the texture unit to the material script and remove it when your application initializes. Then add it back and remove as needed. Be sure to dispose the texture unit on exit if you own it (as opposed to the material pass owning it). This way you you don't need to write the code creating it from scratch.