Problem with material display/loading/naming

Discussion of issues specific to mobile platforms such as iOS, Android, Symbian and Meego.
Chloe
Gnoblar
Posts: 15
Joined: Mon May 09, 2011 12:08 pm

Problem with material display/loading/naming

Post by Chloe »

Hi everyone :)

I have a mystical behavior with materials.

I create 5 new materials associated with 5 different meshes with 5 different images, like this:

Code: Select all

material 0
{
	technique
	{
		pass
		{
			cull_hardware none

			texture_unit
			{
				texture testTexture0.png
				tex_address_mode mirror
			}
		}
	}
}
I set manualy the material with

Code: Select all

setMaterialName("0");
First strange behavior, the 0 and 1 textures are displayed but not 2, 3 and 4.
Second strange behavior, if I replace testTexture0 by testTexture4, ogre doesn't display texture 4 on my first mesh.
Third strange behavior, I rename testTexture0 and once again ogre doesn't display the texture on the first mesh.
Fourth strange behavior, I replace testTexture4.png (for the 5th mesh) by goldenmetal.jpg, an old image that i used before, and ogre displays the texture.

Everytime, the right .png is loaded; I have this in the console:

Code: Select all

Texture: testTexture4.png: Loading 1 faces(PF_B8G8R8,256x256x1) with 5 hardware generated mipmaps from Image. Internal format is PF_R8G8B8,256x256x1.
Any idea?
Thanks!!

PS: I try closing and opening XCode and cleaning the simulator, the targets...