[SOLVED] token "set_texture_alias" is not recognized

Discussion of issues specific to mobile platforms such as iOS, Android, Symbian and Meego.
User avatar
CoreDumped
Gremlin
Posts: 177
Joined: Sun Aug 05, 2007 3:55 pm
x 14

[SOLVED] token "set_texture_alias" is not recognized

Post by CoreDumped »

Hi,
I cannot use set_texture_alias in my material scripts in iOS devices. However the same script works fine in in windows
I get this error message when the script is parsed:

Code: Select all

token "set_texture_alias" is not recognized
Material script

Code: Select all

material ShinyBase
{
	technique iOS
	{
		pass
		{
			vertex_program_ref ShinyVP
			{
			}

			fragment_program_ref ShinyFP
			{
			}

			texture_unit diffuseMap
			{
                texture BaseWhite.png
			}

			texture_unit specMap
			{
                texture BaseWhite.png
			}
		}
	}
}


material ShinyTest : ShinyBase
{
	technique iOS
	{
		pass
		{
			set_texture_alias diffuseMap Floor01_D.pvr
			set_texture_alias specMap Floor01_S.pvr
		}
	}
}

Instead, the workaround like this works

Code: Select all

			texture_unit specMap
			{
				texture $texture_name
			}
Is there a known reason why this doesn't work before I start to debug it?

Thanks
Last edited by CoreDumped on Fri Jul 08, 2011 12:58 pm, edited 1 time in total.
User avatar
masterfalcon
OGRE Retired Team Member
OGRE Retired Team Member
Posts: 4270
Joined: Sun Feb 25, 2007 4:56 am
Location: Bloomington, MN
x 126

Re: token "set_texture_alias" is not recognized

Post by masterfalcon »

That's a material attribute but you have it defined in a pass. Just move them outside of the pass and technique scope and it should work fine.
User avatar
CoreDumped
Gremlin
Posts: 177
Joined: Sun Aug 05, 2007 3:55 pm
x 14

Re: token "set_texture_alias" is not recognized

Post by CoreDumped »

Thanks, its working