vandamme
12-12-2006 16:07:31
Do you know if it is possible to dynamically load/change textures on an object with Mogre while application is running.
It seems that we can't do that by using material scripts in .material files.
Bekas
12-12-2006 17:28:53
You can dynamically create and/or manipulate materials; for example:
entity.GetSubEntity(0).GetMaterial().GetTechnique(0).GetPass(0).GetTextureUnitState(0).SetTextureName("mytexture.jpg");
vandamme
13-12-2006 09:53:50
I have tested it with Entity it works fine.
But, it doesn't work on a ManualObject instance (I don't have the GetMaterial() method on a manual object).
I have also tried with the GetMaterial() method of the SceneObject englobing the ManualObject but it doesn't work.
Does - it mean that a shoud save meshes of a ManualObject in a file in order to use it as an Entity to dynamically change texture ?
Bekas
13-12-2006 10:11:58
vandamme
14-12-2006 14:13:43
I didn't make it with MaterialManager.
But it works fine by converting ManualObject as an entity.
Thks.